From: <ndi...@us...> - 2002-10-05 00:51:23
|
Update of /cvsroot/modus/org/bacfug/modus/caching In directory usw-pr-cvs1:/tmp/cvs-serv31663/bacfug/modus/caching Added Files: basecache.cfc Log Message: moving caching to its own structure, so we build a baseCache to define the interface and provide default methods for cache implementations --- NEW FILE: basecache.cfc --- <cfcomponent hint="the base cache object"> <cffunction name="init" access="public" hint="The initializer" returnType="org.bacfug.modus.caching.baseCache" output="no"> <cfscript> //make sure the cache is initialized if(NOT isCacheInitialized()) cacheInit(); </cfscript> <cfreturn this> </cffunction> <!--- is the cache primed ---> <cffunction name="isCacheInitialized" access="package" output="no" returnType="boolean" hint="Returns a boolean for whether the cache is initialized"> <cfthrow message="isCacheInitialized() not implemented in #getMetaData(this).name#"> </cffunction> <!--- initialize the cache ---> <cffunction name="cacheInit" access="package" output="no" returnType="void" hint="Initializes the cache"> <cfthrow message="cacheInit() not implemented in #getMetaData(this).name#"> </cffunction> <!--- is a particular object instance in the cache? ---> <cffunction name="isObjectCached" access="package" output="no" returnType="boolean" hint="Returns a boolean for whether a particular object (Based on ID) is cached"> <cfthrow message="isObjectCached not implemented in #getMetaData(this).name#"> </cffunction> <!--- put an object in the cache ---> <cffunction name="putObject" access="package" output="no" returnType="void" hint="Put a contentObject instance into the cache"> <cfthrow message="putObject not implemented in #getMetaData(this).name#"> </cffunction> <!--- get an object from the cache ---> <cffunction name="getObject" access="package" output="no" returnType="org.bacfug.modus.baseContentObject" hint="get an object instance from the cache"> <cfthrow message="getObject not implemented in #getMetaData(this).name#"> </cffunction> </cfcomponent> |