Class Swift_Cache

Description

The interface for any cache mechanisms to follow

Located in /Swift/Cache.php (line 18)


	
			
Direct descendents
Class Description
Swift_Cache_Disk Caches data in files on disk - this is the best approach if possible
Swift_Cache_Memory Caches data in variables - uses memory!
Method Summary
void clear (string $key)
boolean has (string $key)
string read (int $key, [ $size = null])
void write (string $key, string $data)
Methods
clear (line 30)

Clear out the buffer for $key

  • access: public
  • abstract:
void clear (string $key)
  • string $key: The cache key

Redefined in descendants as:
getOutputStream (line 49)

A factory method to return an output stream object for the relevant location in the cache

  • access: public
Swift_Cache_OutputStream getOutputStream (string $key)
  • string $key: The cache key to fetch the stream for
has (line 36)

Check if there is something in the cache for $key

  • access: public
  • abstract:
boolean has (string $key)
  • string $key: The cache key

Redefined in descendants as:
read (line 43)

Read bytes from the cached buffer and seek forward in the buffer

Returns false once no more bytes are left to read

  • access: public
  • abstract:
string read (int $key, [ $size = null])
  • int $key: The number of bytes to read (may be ignored)
  • $size

Redefined in descendants as:
write (line 25)

Append bytes to the cache buffer identified by $key

  • access: public
  • abstract:
void write (string $key, string $data)
  • string $key: The Cache key
  • string $data: The bytes to append

Redefined in descendants as:

Documentation generated on Wed, 26 Mar 2008 20:33:04 +1100 by phpDocumentor 1.3.1