summaryrefslogtreecommitdiffstats
path: root/application/models/mfile.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-08-15 17:10:58 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-08-15 17:12:21 +0200
commit7f0065ddbd80fe32e49cede2d65d231c6ec6f183 (patch)
tree3291f894b163cd75729c15d08be82e9d6d7c4258 /application/models/mfile.php
parent92c84158677f30edb8872754d92832a35420952d (diff)
Switch to CI's caching class
This supports more caching backends and doesn't force users to install the memcache extension. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models/mfile.php')
-rw-r--r--application/models/mfile.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/application/models/mfile.php b/application/models/mfile.php
index fabce7b94..f992a0891 100644
--- a/application/models/mfile.php
+++ b/application/models/mfile.php
@@ -338,8 +338,8 @@ class Mfile extends CI_Model {
}
public function get_lexers() {
- $this->load->library("MemcacheLibrary");
- if (! $lexers = $this->memcachelibrary->get('lexers')) {
+ $this->load->driver('cache', array('adapter' => $this->config->item("cache_backend")));
+ if (! $lexers = $this->cache->get('lexers')) {
$lexers = array();
$last_desc = "";
exec("python ".escapeshellarg(FCPATH."scripts/get_lexer_list.py"), $output);
@@ -353,7 +353,7 @@ class Mfile extends CI_Model {
$lexers[$name] = $desc;
}
$lexers["text"] = "Plain text";
- $this->memcachelibrary->set('lexers', $lexers, 1800);
+ $this->cache->save('lexers', $lexers, 1800);
}
return $lexers;