From: <ndi...@us...> - 2002-10-05 00:53:04
|
Update of /cvsroot/modus/org/bacfug/modus/persistence In directory usw-pr-cvs1:/tmp/cvs-serv32037/bacfug/modus/persistence Modified Files: simplefilesystempersister.cfc simpleobjectinstance.cfc Log Message: updated to the new instance.cache instead of assuming that caching is part of the persister. Index: simplefilesystempersister.cfc =================================================================== RCS file: /cvsroot/modus/org/bacfug/modus/persistence/simplefilesystempersister.cfc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simplefilesystempersister.cfc 14 Sep 2002 01:22:06 -0000 1.1 --- simplefilesystempersister.cfc 5 Oct 2002 00:53:01 -0000 1.2 *************** *** 23,27 **** <cffile action="write" file="#getPathFromObject(arguments.contentObject)#" output="#packet#"> <!--- put the object in the cache ---> ! <cfset cachePutObject(arguments.contentObject)> <!--- if it's not a good contentObject ---> <cfelse> --- 23,27 ---- <cffile action="write" file="#getPathFromObject(arguments.contentObject)#" output="#packet#"> <!--- put the object in the cache ---> ! <cfset instance.cache.putObject(arguments.contentObject)> <!--- if it's not a good contentObject ---> <cfelse> *************** *** 39,44 **** <!--- if this object is cached, return that one ---> <cfscript> ! if(isObjectCached(arguments.id)){ ! objectRetrieved = cacheGetObject(arguments.id); if(structCount(arguments) GT 1) return contentObjectPopulateFromInstance(arguments[2],objectRetrieved); --- 39,44 ---- <!--- if this object is cached, return that one ---> <cfscript> ! if(instance.cache.isObjectCached(arguments.id)){ ! objectRetrieved = instance.cache.getObject(arguments.id); if(structCount(arguments) GT 1) return contentObjectPopulateFromInstance(arguments[2],objectRetrieved); *************** *** 65,68 **** --- 65,69 ---- } </cfscript> + <cfset instance.cache.putObject(objectRetrieved)> <cfreturn objectRetrieved> </cffunction> Index: simpleobjectinstance.cfc =================================================================== RCS file: /cvsroot/modus/org/bacfug/modus/persistence/simpleobjectinstance.cfc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** simpleobjectinstance.cfc 12 Sep 2002 19:17:48 -0000 1.4 --- simpleobjectinstance.cfc 5 Oct 2002 00:53:01 -0000 1.5 *************** *** 43,47 **** </cfif> <!--- put the object in the cache ---> ! <cfset cachePutObject(arguments.contentObject)> <!--- if it's not a good contentObject ---> <cfelse> --- 43,47 ---- </cfif> <!--- put the object in the cache ---> ! <cfset instance.cache.putObject(arguments.contentObject)> <!--- if it's not a good contentObject ---> <cfelse> *************** *** 58,63 **** <!--- if this object is cached, return that one ---> <cfscript> ! if(isObjectCached(arguments.id)){ ! objectRetrieved = cacheGetObject(arguments.id); if(structCount(arguments) GT 1) return contentObjectPopulateFromInstance(arguments[2],objectRetrieved); --- 58,63 ---- <!--- if this object is cached, return that one ---> <cfscript> ! if(instance.cache.isObjectCached(arguments.id)){ ! objectRetrieved = instance.cache.getObject(arguments.id); if(structCount(arguments) GT 1) return contentObjectPopulateFromInstance(arguments[2],objectRetrieved); *************** *** 89,93 **** </cfif> <!--- put the object in the cache ---> ! <cfset cachePutObject(objectRetrieved)> <!--- return the object ---> <cfreturn objectRetrieved> --- 89,93 ---- </cfif> <!--- put the object in the cache ---> ! <cfset instance.cache.putObject(objectRetrieved)> <!--- return the object ---> <cfreturn objectRetrieved> *************** *** 115,124 **** for(ii = 1; ii LTE getQuery.recordCount; ii = ii + 1){ //if the object is in the cache, use that ! if(isObjectCached(getQuery.id[ii])){ ! thisInstance = cacheGetObject(getQuery.id[ii]); } else{ thisInstance = wddxToContentObject(getQuery.packet[ii]); ! cachePutObject(thisInstance); } objectArray[ii] = thisInstance; --- 115,124 ---- for(ii = 1; ii LTE getQuery.recordCount; ii = ii + 1){ //if the object is in the cache, use that ! if(instance.cache.isObjectCached(getQuery.id[ii])){ ! thisInstance = instance.cache.getObject(getQuery.id[ii]); } else{ thisInstance = wddxToContentObject(getQuery.packet[ii]); ! instance.cache.putObject(thisInstance); } objectArray[ii] = thisInstance; |