summaryrefslogtreecommitdiffstats
path: root/application/libraries/Pygments.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-04-02 17:34:47 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-04-02 17:39:09 +0200
commit6d3fa5c8718b01babd26d63b53da984c6641c22c (patch)
tree8764aa5f72c5d01802ce7a760dfc79a2ae68f2eb /application/libraries/Pygments.php
parent0702e8b7b343d3b1ea421875f5d62e40d2c07d69 (diff)
Pygments::get_pygments_info: cache in memory
It's used multiple times if we are rendering a multipaste so it makes sense not to run to the backend cache each time (if there even is one). This reduced the render time for a multipaste with 180 items from >500ms to ~225ms when using the file cache backend. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/Pygments.php')
-rw-r--r--application/libraries/Pygments.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/libraries/Pygments.php b/application/libraries/Pygments.php
index 24975d6a1..12f6d7037 100644
--- a/application/libraries/Pygments.php
+++ b/application/libraries/Pygments.php
@@ -21,7 +21,7 @@ class Pygments {
}
private static function get_pygments_info() {
- return cache_function('pygments_info', 1800, function() {
+ return cache_function_full('pygments_info', 1800, function() {
ob_start();
passthru("python ".escapeshellarg(FCPATH."scripts/get_lexer_list.py"));
$output = ob_get_clean();