private function MongoDBCache::isExpired in Plug 7
Check if the document is expired.
Parameters
array $document:
Return value
boolean
2 calls to MongoDBCache::isExpired()
- MongoDBCache::doContains in lib/
doctrine/ cache/ lib/ Doctrine/ Common/ Cache/ MongoDBCache.php - Tests if an entry exists in the cache.
- MongoDBCache::doFetch in lib/
doctrine/ cache/ lib/ Doctrine/ Common/ Cache/ MongoDBCache.php - Fetches an entry from the cache.
File
- lib/
doctrine/ cache/ lib/ Doctrine/ Common/ Cache/ MongoDBCache.php, line 185
Class
- MongoDBCache
- MongoDB cache provider.
Namespace
Doctrine\Common\CacheCode
private function isExpired(array $document) {
return isset($document[self::EXPIRATION_FIELD]) && $document[self::EXPIRATION_FIELD] instanceof MongoDate && $document[self::EXPIRATION_FIELD]->sec < time();
}