| 123456789101112131415161718192021222324252627282930 |
- <?php
- class navigation_auto_cache extends auto_cache{
- private $key = "navigation";
-
- public function load($param)
- {
- $list = $GLOBALS['cache']->get($this->key);
- if($list === false)
- {
- $sql = "select * from ".DB_PREFIX."navigation ORDER BY sort ASC";
- $list = $GLOBALS['db']->getAll($sql,true,true);
- $GLOBALS['cache']->set($this->key,$list);
- }
-
- return $list;
- }
-
- public function rm($param)
- {
- $GLOBALS['cache']->rm($this->key);
- }
-
- public function clear_all()
- {
- $GLOBALS['cache']->rm($this->key);
- }
- }
- ?>
|