function FileCache::writeFile

8.0.x FileCache.php FileCache::writeFile($filename, $cache)
7.x FileCache.php FileCache::writeFile($filename, $cache)
master FileCache.php FileCache::writeFile($filename, $cache)

Serializes data and write it to the given filename.

Parameters

string $filename: Absolute path to filename to write cache data.

$cache: Cache data to serialize and write to $filename.

1 call to FileCache::writeFile()
FileCache::set in lib/Drush/Cache/FileCache.php
Store data in the persistent cache.
1 method overrides FileCache::writeFile()
JSONCache::writeFile in lib/Drush/Cache/JSONCache.php
Serializes data and write it to the given filename.

File

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

Namespace

Drush\Cache

Class

FileCache
Default cache implementation.

Code

function writeFile($filename, $cache) {
  return file_put_contents($filename, serialize($cache));
}