
Public Member Functions | |
| __construct ($group) | |
| clean () | |
| get ($id) | |
| save ($data, $id=null) | |
Protected Member Functions | |
| getGroupPath () | |
| getCachePath ($name) | |
| encodeID ($id) | |
Protected Attributes | |
| $group = '' | |
| $idencoded = '' | |
| $caching = true | |
| $timeout = _ALIRO_HTML_CACHE_TIME_LIMIT | |
| $sizelimit = _ALIRO_HTML_CACHE_SIZE_LIMIT | |
| $livesite = '' | |
Definition at line 41 of file aliroCache.php.
| aliroSimpleCache::__construct | ( | $ | group | ) |
Reimplemented in aliroCache.
Definition at line 49 of file aliroCache.php.
References $group.
00049 { 00050 if ($group) $this->group = $group; 00051 else trigger_error ('Cannot create cache without specifying group name'); 00052 parent::__construct(); 00053 }
| aliroSimpleCache::getGroupPath | ( | ) | [protected] |
Definition at line 55 of file aliroCache.php.
References aliroFileManager::getInstance().
Referenced by clean(), and getCachePath().
00055 { 00056 $grouppath = $this->basepath."html/$this->group/"; 00057 if (!file_exists($grouppath)) aliroFileManager::getInstance()->createDirectory ($grouppath); 00058 return $grouppath; 00059 }
| aliroSimpleCache::getCachePath | ( | $ | name | ) | [protected] |
Reimplemented from aliroBasicCache.
Definition at line 61 of file aliroCache.php.
References getGroupPath().
00061 { 00062 return $this->getGroupPath().$name; 00063 }
| aliroSimpleCache::clean | ( | ) |
Definition at line 65 of file aliroCache.php.
References getGroupPath().
00065 { 00066 $path = $this->getGroupPath(); 00067 $dir = new aliroDirectory($path); 00068 $dir->deleteFiles(); 00069 }
| aliroSimpleCache::get | ( | $ | id | ) |
Definition at line 71 of file aliroCache.php.
References encodeID(), and aliroBasicCache::retrieve().
00071 { 00072 $this->idencoded = $this->encodeID($id); 00073 return $this->retrieve ($this->idencoded); 00074 }
| aliroSimpleCache::save | ( | $ | data, | |
| $ | id = null | |||
| ) |
Definition at line 76 of file aliroCache.php.
References encodeID(), and aliroBasicCache::store().
Referenced by aliroCache::call().
00076 { 00077 if ($id) $this->idencoded = $this->encodeID($id); 00078 return $this->store ($data, $this->idencoded); 00079 }
| aliroSimpleCache::encodeID | ( | $ | id | ) | [protected] |
aliroSimpleCache::$group = '' [protected] |
Definition at line 42 of file aliroCache.php.
Referenced by aliroCache::__construct(), and __construct().
aliroSimpleCache::$idencoded = '' [protected] |
Definition at line 43 of file aliroCache.php.
aliroSimpleCache::$caching = true [protected] |
Definition at line 44 of file aliroCache.php.
aliroSimpleCache::$timeout = _ALIRO_HTML_CACHE_TIME_LIMIT [protected] |
aliroSimpleCache::$sizelimit = _ALIRO_HTML_CACHE_SIZE_LIMIT [protected] |
aliroSimpleCache::$livesite = '' [protected] |
Definition at line 47 of file aliroCache.php.
1.5.5