Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • DevNullStorage
  • FileJournal
  • FileStorage
  • MemcachedStorage
  • MemoryStorage
  • PhpFileStorage
  • SQLiteStorage

Interfaces

  • IJournal
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class FileStorage

Cache file storage.

Nette\Object
Extended by Nette\Caching\Storages\FileStorage implements Nette\Caching\IStorage

Direct known subclasses

Nette\Caching\Storages\PhpFileStorage
Namespace: Nette\Caching\Storages
Author: David Grudl
Located at Caching/Storages/FileStorage.php
Methods summary
public
# __construct( $dir, Nette\Caching\Storages\IJournal $journal = NULL )
public mixed|null
# read( string $key )

Read from cache.

Read from cache.

Parameters

$key
string
key

Returns

mixed|null

Implementation of

Nette\Caching\IStorage::read()
public
# lock( string $key )

Prevents item reading and writing. Lock is released by write() or remove().

Prevents item reading and writing. Lock is released by write() or remove().

Parameters

$key
string
key

Implementation of

Nette\Caching\IStorage::lock()
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

Nette\Caching\IStorage::write()
public
# remove( string $key )

Removes item from the cache.

Removes item from the cache.

Parameters

$key
string
key

Implementation of

Nette\Caching\IStorage::remove()
public
# clean( array $conditions )

Removes items from the cache by conditions & garbage collector.

Removes items from the cache by conditions & garbage collector.

Parameters

$conditions
array
conditions

Implementation of

Nette\Caching\IStorage::clean()
protected array|null
# readMetaAndLock( 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
Methods inherited from Nette\Object
__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'
#

additional cache structure

additional cache structure

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 TRUE
#
Magic properties inherited from Nette\Object
$reflection
Nette 2.2 API documentation generated by ApiGen 2.8.0