You are here

constant MongoDBCache::EXPIRATION_FIELD in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php \Doctrine\Common\Cache\MongoDBCache::EXPIRATION_FIELD

The expiration field will store a MongoDate value indicating when the cache entry should expire.

With MongoDB 2.2+, entries can be automatically deleted by MongoDB by indexing this field wit the "expireAfterSeconds" option equal to zero. This will direct MongoDB to regularly query for and delete any entries whose date is older than the current time. Entries without a date value in this field will be ignored.

The cache provider will also check dates on its own, in case expired entries are fetched before MongoDB's TTLMonitor pass can expire them.

See also

http://docs.mongodb.org/manual/tutorial/expire-data/

File

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

Class

MongoDBCache
MongoDB cache provider.

Namespace

Doctrine\Common\Cache

Code

const EXPIRATION_FIELD = 'e';