Class Cache_Engine_File_Item

Description

The key object for the file cache engine.

Located in /cache/lib/Cache/Engine/File.php (line 216)

Cache_ItemBase
   |
   --Cache_Engine_File_Item
Variable Summary
 mixed $engine
 mixed $lock
 mixed $locked
 mixed $options
 mixed $token
Method Summary
 Cache_Engine_File_Item __construct ( $engine,  $key,  $options)
 boolean exists ()
 void lock (int $type, [boolean $create = false])
 void make_directory (string $dir)
 int mtime ()
 mixed read ()
 void remove ()
 void unlock ()
 void write (mixed $data)
Variables
mixed $engine (line 217)
  • access: protected
mixed $lock (line 220)
  • access: protected
mixed $locked (line 219)
  • access: protected
mixed $options (line 218)
  • access: protected
mixed $token (line 221)
  • access: protected

Inherited Variables

Inherited from Cache_ItemBase

Cache_ItemBase::$key
Methods
Constructor __construct (line 226)

Constructor

  • access: public
Cache_Engine_File_Item __construct ( $engine,  $key,  $options)
  • $engine
  • $key
  • $options

Redefinition of:
Cache_ItemBase::__construct()
Constructor
exists (line 302)

Test for the existence of the key in the cache. Return true if it exists, false otherwise.

  • access: public
boolean exists ()

Redefinition of:
Cache_ItemBase::exists()
Test for the existence of the key in the cache. Return true if it exists, false otherwise.
lock (line 243)

Acquire a lock on the key. The method blocks until the lock is acquired.

  • access: public
void lock (int $type, [boolean $create = false])
  • int $type: The lock type, either LOCK_READ or LOCK_WRITE
  • boolean $create: The flag indicating whether to create the key or not

Redefinition of:
Cache_ItemBase::lock()
Acquire a lock on the key. The method is expected to block until the lock is acquired.
make_directory (line 372)

Creates a directory (and any parent directories) as needed

  • access: protected
void make_directory (string $dir)
  • string $dir: The directory to created
mtime (line 316)

Return the last modified time (as a Unix timestamp) of the value associated with the key.

  • access: public
int mtime ()

Redefinition of:
Cache_ItemBase::mtime()
Return the last modified time (as a Unix timestamp) of the value
read (line 329)

Return the value associated with the key from the cache

If the key does not have a value, this function returns null.

  • access: public
mixed read ()

Redefinition of:
Cache_ItemBase::read()
Return the value associated with the key from the cache
remove (line 361)

Remove the key from the cache

  • access: public
void remove ()

Redefinition of:
Cache_ItemBase::remove()
Remove the key from the cache
unlock (line 281)

Release any acquired lock for the key.

  • access: public
void unlock ()

Redefinition of:
Cache_ItemBase::unlock()
Release any acquired lock for the key. As with lock(), this function should merely return (the default) if locking is not supported.
write (line 344)

Set the value associated with the key

  • access: public
void write (mixed $data)
  • mixed $data: The value to associate with the key

Redefinition of:
Cache_ItemBase::write()
Set the value associated with the key

Inherited Methods

Inherited From Cache_ItemBase

 Cache_ItemBase::__construct()
 Cache_ItemBase::exists()
 Cache_ItemBase::key()
 Cache_ItemBase::lock()
 Cache_ItemBase::marshall()
 Cache_ItemBase::mtime()
 Cache_ItemBase::read()
 Cache_ItemBase::remove()
 Cache_ItemBase::unlock()
 Cache_ItemBase::unmarshall()
 Cache_ItemBase::write()
Class Constants

Documentation generated on Wed, 25 Apr 2012 09:46:42 -0700 by phpDocumentor 1.4.3