function FileCache::readFile

8.0.x FileCache.php FileCache::readFile($filename)
7.x FileCache.php FileCache::readFile($filename)
master FileCache.php FileCache::readFile($filename)

Returns the contents of the given filename unserialized.

Parameters

string $filename: Absolute path to filename to read contents from.

1 call to FileCache::readFile()
FileCache::getMultiple in lib/Drush/Cache/FileCache.php
Return data from the persistent cache when given an array of cache IDs.
1 method overrides FileCache::readFile()
JSONCache::readFile in lib/Drush/Cache/JSONCache.php
Returns the contents of the given filename unserialized.

File

lib/Drush/Cache/FileCache.php, line 68
Definition of Drush\Cache\FileCache.

Namespace

Drush\Cache

Class

FileCache
Default cache implementation.

Code

function readFile($filename) {
  $item = file_get_contents($filename);
  return $item ? unserialize($item) : FALSE;
}