Advertisement
miraage

Untitled

Aug 23rd, 2011
1,654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2.  
  3. interface cacheInterface
  4. {
  5.     /**
  6.      * Put data in cache
  7.      *
  8.      * @param string $key - Store key
  9.      * @param mixed $data - Data to store
  10.      * @param integer $ttl - Optional, cache TTL
  11.      * @return void
  12.      */
  13.     public function put($key, $value, $ttl = 0);
  14.    
  15.     /**
  16.      * Get data from cache
  17.      *
  18.      * @param string $key - Key to withdraw
  19.      * @return mixed
  20.      */
  21.     public function get($key);
  22.    
  23.     /**
  24.      * Remove data from cache
  25.      *
  26.      * @param string $key - Key to remove
  27.      * @return void
  28.      */
  29.     public function remove($key);
  30.    
  31.     /**
  32.      * Connection
  33.      *
  34.      * @param array $opts - Optional, connection options
  35.      * @return boolean - Connection status
  36.      */
  37.     public function connect(array $opts);
  38.    
  39.     /**
  40.      * Disconnect
  41.      *
  42.      * @return void
  43.      */
  44.     public function disconnect();
  45. }
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement