/** * Saves data in a cache file. * * @param string $entryIdentifier An identifier for this specific cache entry * @param string $data The data to be stored * @param array $tags Tags to associate with this cache entry * @param int $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime. * @return void * @throws Exception if no cache frontend has been set. * @throws InvalidDataException if the data to be stored is not a string. */ public function set($entryIdentifier, $data, array $tags = array(), $lifetime = null) { parent::set($entryIdentifier, $data, $tags, $lifetime); if ($lifetime === 0) { // unlimited is not supported by nginx $lifetime = 24 * 60 * 60; } header('X-Accel-Expires: ' . $lifetime); }