[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/mustache/src/Mustache/Cache/ -> FilesystemCache.php (summary)

(no description)

File Size: 155 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Mustache_Cache_FilesystemCache:: (6 methods):
  __construct()
  load()
  cache()
  getCacheFilename()
  buildDirectoryForFilename()
  writeFile()


Class: Mustache_Cache_FilesystemCache  - X-Ref

Mustache Cache filesystem implementation.

A FilesystemCache instance caches Mustache Template classes from the filesystem by name:

$cache = new Mustache_Cache_FilesystemCache(dirname(__FILE__).'/cache');
$cache->cache($className, $compiledSource);

The FilesystemCache benefits from any opcode caching that may be setup in your environment. So do that, k?
__construct($baseDir, $fileMode = null)   X-Ref
Filesystem cache constructor.

param: string $baseDir  Directory for compiled templates.
param: int    $fileMode Override default permissions for cache files. Defaults to using the system-defined umask.

load($key)   X-Ref
Load the class from cache using `require_once`.

param: string $key
return: bool

cache($key, $value)   X-Ref
Cache and load the compiled class.

param: string $key
param: string $value

getCacheFilename($name)   X-Ref
Build the cache filename.
Subclasses should override for custom cache directory structures.

param: string $name
return: string

buildDirectoryForFilename($fileName)   X-Ref
Create cache directory.

param: string $fileName
return: string

writeFile($fileName, $value)   X-Ref
Write cache file.

param: string $fileName
param: string $value



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1