Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NCache
  • NDummyStorage
  • NFileStorage
  • NMemcachedStorage

Interfaces

  • ICacheStorage
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NFileStorage

Cache file storage.

NObject
Extended by NFileStorage implements ICacheStorage

Direct known subclasses

NTemplateCacheStorage
Package: Nette\Caching
Author: David Grudl
Located at Caching/FileStorage.php
Methods summary
public
# __construct( $dir )
public mixed|null
# read( string $key )

Read from cache.

Read from cache.

Parameters

$key
string
key

Returns

mixed|null

Implementation of

ICacheStorage::read
public
# write( string $key, mixed $data, array $dp )

Writes item into the cache.

Writes item into the cache.

Parameters

$key
string
key
$data
mixed
data
$dp
array
dependencies

Implementation of

ICacheStorage::write
public
# remove( string $key )

Removes item from the cache.

Removes item from the cache.

Parameters

$key
string
key

Implementation of

ICacheStorage::remove
public
# clean( array $conds )

Removes items from the cache by conditions & garbage collector.

Removes items from the cache by conditions & garbage collector.

Parameters

$conds
array
conditions

Implementation of

ICacheStorage::clean
protected array|null
# readMeta( string $file, integer $lock )

Reads cache data from disk.

Reads cache data from disk.

Parameters

$file
string
file path
$lock
integer
lock mode

Returns

array|null
protected mixed
# readData( array $meta )

Reads cache data from disk and closes cache file handle.

Reads cache data from disk and closes cache file handle.

Parameters

$meta
array

Returns

mixed
protected string
# getCacheFile( string $key )

Returns file name.

Returns file name.

Parameters

$key
string

Returns

string
protected resource
# getDb( )

Returns SQLite resource.

Returns SQLite resource.

Returns

resource
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
integer META_HEADER_LEN 28
#
string META_TIME 'time'
#
string META_SERIALIZED 'serialized'
#
string META_EXPIRE 'expire'
#
string META_DELTA 'delta'
#
string META_ITEMS 'di'
#
string META_CALLBACKS 'callbacks'
#
string FILE 'file'
#

additional cache structure

additional cache structure

string HANDLE 'handle'
#
Properties summary
public static float $gcProbability 0.001
#

probability that the clean() routine is started

probability that the clean() routine is started

public static boolean $useDirectories
#
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0