method has documentation in bbn\Cache

Checks whether a valid cache exists for the given item.

function($item, $ttl = NULL) { if (self::$type) { switch (self::$type){ case 'apc': return apc_exists($item); case 'memcache': return $this->obj->get($item) !== $item; case 'files': $file = self::_file($item, $this->path); if (($content = $this->fs->getContents($file)) && ($t = json_decode($content, true)) ) { if ((!$ttl || !isset($t['ttl']) || ($ttl === $t['ttl'])) && (!$t['expire'] || ($t['expire'] > time())) ) { return true; } $this->fs->delete($file); } return false; } } }

Checks whether a valid cache exists for the given item. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.