PHP Classes

File: CacheLib.php

Recommend this page to a friend!
  Classes of Eugene Panin   ObjectCache   CacheLib.php   Download  
File: CacheLib.php
Role: ???
Content type: text/plain
Description: Library file
Class: ObjectCache
Author: By
Last change:
Date: 23 years ago
Size: 660 bytes
 

Contents

Class file image Download
<? class ObjectCache { var $cache=array(); function add($anOID,&$obj) { $this->cache[$anOID] =& $obj; } function remove($anOID) { unset($this->cache[$anOID]); } function &find($anOID) { if ($this->cache[$anOID]) return $this->cache[$anOID]; return null; } function isExist($anOID) { if ($this->cache[$anOID]) return true; return false; } function isEmpty() { if (count($this->cache)>0) return true; return false; } function getKeys() { return array_keys($this->cache); } function len() { return count($this->cache); } function clear() { $this->cache = array(); } } ?>