protected function clearExpired()
    {
        if (empty($this->cache)) {
            $file = $this->directory . 'Cache.dat';

            //~ Retrieve Cache information.
            if (file_exists($file)) {
                $content = file_get_contents($file);
                if (!empty($content)) {
                    $this->cache = unserialize($content);
                } else {
                    $this->cache = array();
                }
            }
        }

        // Clean all caches have expired.
        foreach ($this->cache as $pKey => $time) {
            if ($time < time()) {
                $this->remove($pKey);
            }
        }

        return true;
    }
protected function clearExpired()
    {
        if (empty($this->cache)) {
            $file = $this->directory . 'Cache.dat';

            //~ Retrieve Cache information.
            if (file_exists($file)) {
                $content = file_get_contents($file);
                if (!empty($content)) {
                    $this->cache = unserialize($content);
                } else {
                    $this->cache = array();
                }
            }
        }

        // Clean all caches have expired.
        foreach ($this->cache as $pKey => $time) {
            if ($time < time()) {
                $this->remove($pKey);
            }
        }

        return true;
    }
protected function clearExpired ( ) { if ( empty ( $ this -> cache ) ) { $ file = $ this -> directory . 'Cache.dat' ; //~ Retrieve Cache information. if ( file_exists ( $ file ) ) { $ content = file_get_contents ( $ file ) ; if ( ! empty ( $ content ) ) { $ this -> cache = unserialize ( $ content ) ; } else { $ this -> cache = array ( ) ; } } } // Clean all caches have expired. foreach ( $ this -> cache as $ pKey => $ time ) { if ( $ time < time ( ) ) { $ this -> remove ( $ pKey ) ; } } return true ; }
Clean Cache have expired.

@return boolean
Clean Cache have expired .