Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14051245
D11832.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11832.diff
View Options
diff --git a/src/infrastructure/markup/PhabricatorMarkupOneOff.php b/src/infrastructure/markup/PhabricatorMarkupOneOff.php
--- a/src/infrastructure/markup/PhabricatorMarkupOneOff.php
+++ b/src/infrastructure/markup/PhabricatorMarkupOneOff.php
@@ -17,6 +17,7 @@
private $content;
private $preserveLinebreaks;
private $engineRuleset;
+ private $disableCache;
public function setEngineRuleset($engine_ruleset) {
$this->engineRuleset = $engine_ruleset;
@@ -41,6 +42,15 @@
return $this->content;
}
+ public function setDisableCache($disable_cache) {
+ $this->disableCache = $disable_cache;
+ return $this;
+ }
+
+ public function getDisableCache() {
+ return $this->disableCache;
+ }
+
public function getMarkupFieldKey($field) {
return PhabricatorHash::digestForIndex($this->getContent()).':oneoff';
}
@@ -74,6 +84,10 @@
}
public function shouldUseMarkupCache($field) {
+ if ($this->getDisableCache()) {
+ return false;
+ }
+
return true;
}
diff --git a/src/infrastructure/markup/PhabricatorMarkupPreviewController.php b/src/infrastructure/markup/PhabricatorMarkupPreviewController.php
--- a/src/infrastructure/markup/PhabricatorMarkupPreviewController.php
+++ b/src/infrastructure/markup/PhabricatorMarkupPreviewController.php
@@ -12,6 +12,7 @@
$output = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
+ ->setDisableCache(true)
->setContent($text),
'default',
$viewer);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 11:10 PM (4 d, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722998
Default Alt Text
D11832.diff (1 KB)
Attached To
Mode
D11832: Disable caching of remarkup previews
Attached
Detach File
Event Timeline
Log In to Comment