Page MenuHomePhabricator

D11832.diff
No OneTemporary

D11832.diff

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

Mime Type
text/plain
Expires
Fri, Nov 8, 2:37 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722998
Default Alt Text
D11832.diff (1 KB)

Event Timeline