cache/Database.php
public function has($key)
    {
        try {
            $ttlColumn = $this->columns['ttl'];

            return (bool) $this->db->from($this->table)
                    ->where($this->columns['key'])->eq($this->prefix . $key)
                    ->andWhere(function ($group) use ($ttlColumn) {
                        $group->where($ttlColumn)->eq(0)
                        ->orWhere($ttlColumn)->gt(time());
                    })
                    ->count();
        } catch (PDOException $e) {
            return false;
        }
    }
public function has($key)
    {
        try {
            $ttlColumn = $this->columns['ttl'];

            return (bool) $this->db->from($this->table)
                    ->where($this->columns['key'])->eq($this->prefix . $key)
                    ->andWhere(function ($group) use ($ttlColumn) {
                        $group->where($ttlColumn)->eq(0)
                        ->orWhere($ttlColumn)->gt(time());
                    })
                    ->count();
        } catch (PDOException $e) {
            return false;
        }
    }
public function has ( $ key ) { try { $ ttlColumn = $ this -> columns [ 'ttl' ] ; return ( bool ) $ this -> db -> from ( $ this -> table ) -> where ( $ this -> columns [ 'key' ] ) -> eq ( $ this -> prefix . $ key ) -> andWhere ( function ( $ group ) use ( $ ttlColumn ) { $ group -> where ( $ ttlColumn ) -> eq ( 0 ) -> orWhere ( $ ttlColumn ) -> gt ( time ( ) ) ; } ) -> count ( ) ; } catch ( PDOException $ e ) { return false ; } }
Returns TRUE if the cache key exists and FALSE if not.

@param   string   $key  Cache key

@return  boolean
Returns TRUE if the cache key exists and FALSE if not .