You are here

private function MongoDBCache::isExpired in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php \Doctrine\Common\Cache\MongoDBCache::isExpired()

Check if the document is expired.

Parameters

array $document:

Return value

boolean

2 calls to MongoDBCache::isExpired()
MongoDBCache::doContains in vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
Tests if an entry exists in the cache.
MongoDBCache::doFetch in vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
Fetches an entry from the cache.

File

vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php, line 185

Class

MongoDBCache
MongoDB cache provider.

Namespace

Doctrine\Common\Cache

Code

private function isExpired(array $document) {
  return isset($document[self::EXPIRATION_FIELD]) && $document[self::EXPIRATION_FIELD] instanceof MongoDate && $document[self::EXPIRATION_FIELD]->sec < time();
}