Class Swift_Cache_Disk

Description

Caches data in files on disk - this is the best approach if possible

Located in /Swift/Cache/Disk.php (line 19)

Swift_Cache
   |
   --Swift_Cache_Disk
Variable Summary
static string $save_path
Method Summary
static void setSavePath ([string $path = "/tmp"])
Swift_Cache_Disk __construct ()
void __destruct ()
void clear (string $key)
boolean has (string $key)
string read (string $key, [int $size = null])
void write (string $key, string $data)
Variables
static string $save_path = "/tmp" (line 35)

The save path on disk

Methods
static method setSavePath (line 48)

Set the save path of the disk - this is a global setting and called statically!

static void setSavePath ([string $path = "/tmp"])
  • string $path: The path to a writable directory
Constructor __construct (line 40)

Ctor

Swift_Cache_Disk __construct ()
Destructor __destruct (line 122)

Dtor.

Clear out cached data at end of script execution or cache destruction

void __destruct ()
clear (line 72)

Clear the cached data (unlink)

void clear (string $key)
  • string $key: The cache key

Redefinition of:
Swift_Cache::clear()
Clear out the buffer for $key
has (line 81)

Check if data is cached for $key

boolean has (string $key)
  • string $key: The cache key

Redefinition of:
Swift_Cache::has()
Check if there is something in the cache for $key
read (line 91)

Read data from the cache for $key

string read (string $key, [int $size = null])
  • string $key: The cache key
  • int $size: The number of bytes to read

Redefinition of:
Swift_Cache::read()
Read bytes from the cached buffer and seek forward in the buffer
write (line 57)

Write data to the cache

void write (string $key, string $data)
  • string $key: The cache key
  • string $data: The data to write

Redefinition of:
Swift_Cache::write()
Append bytes to the cache buffer identified by $key

Inherited Methods

Inherited From Swift_Cache

Swift_Cache::clear()
Swift_Cache::getOutputStream()
Swift_Cache::has()
Swift_Cache::read()
Swift_Cache::write()

Documentation generated on Tue, 06 Mar 2007 23:32:22 +0000 by phpDocumentor 1.3.1