system/libary/cache.php
/**
     * Delete expired cached data
     *
     * @return int
     */
Delete expired cached data
@return int
Delete expired cached data @return int
public function deleteExpiredCache()
    {
        $counter = 0;
        $cacheContent = $this->_loadCache();
        if (is_array($cacheContent)) {
            foreach ($cacheContent as $key => $value) {
                if ($this->_isExpired($value['time'], $value['expire']) === true) {
                    unset($cacheContent[$key]);
                    $counter++;
                }
            }
            if ($counter > 0) {
                $cacheContent = json_encode($cacheContent);
                file_put_contents($this->_getCacheDir(), $cacheContent);
            }
        }
        return $counter;
    }
public function deleteExpiredCache ( ) { $ counter = 0 ; $ cacheContent = $ this -> _loadCache ( ) ; if ( is_array ( $ cacheContent ) ) { foreach ( $ cacheContent as $ key => $ value ) { if ( $ this -> _isExpired ( $ value [ 'time' ] , $ value [ 'expire' ] ) === true ) { unset ( $ cacheContent [ $ key ] ) ; $ counter ++ ; } } if ( $ counter > 0 ) { $ cacheContent = json_encode ( $ cacheContent ) ; file_put_contents ( $ this -> _getCacheDir ( ) , $ cacheContent ) ; } } return $ counter ; }
Delete expired cached data
 @return int
Delete expired cached data @return int