/cacheManagement/examples/root/event/Event.cfc
http://coldfusioncachemanager.googlecode.com/ · ColdFusion CFScript · 46 lines · 35 code · 11 blank · 0 comment · 0 complexity · dee520c0d0f8d726812a9f37d01724b1 MD5 · raw file
- <cfcomponent output="false">
-
- <cffunction name="init" access="public" returntype="Event" output="false">
- <cfargument name="facade" type="Any" required="true" />
- <cfset variables.facade = arguments.facade />
-
- <cfset variables.facade.setValue( 'onCacheAdded', arrayNew(1) ) />
- <cfset variables.facade.setValue( 'onCacheRemoved', arrayNew(1) ) />
- <cfset variables.facade.setValue( 'onElementPut', arrayNew(1) ) />
- <cfset variables.facade.setValue( 'onElementExpired', arrayNew(1) ) />
- <cfset variables.facade.setValue( 'onElementRemoved', arrayNew(1) ) />
- <cfset variables.facade.setValue( 'onElementsRemoveAll', arrayNew(1) ) />
-
- <cfreturn this />
- </cffunction>
-
- <cffunction name="appendMessage" access="private" returntype="void" output="false">
- <cfargument name="type" type="String" required="true" />
- <cfset variables.facade.getValue( arguments.type ).add( "-" & dateFormat( now(), 'dd-mm-yyyy' ) & "-" & timeFormat( now(), 'hh-mm-ss-ms' ) & "<br />") />
- </cffunction>
-
- <cffunction name="onCacheAdded" access="public" returntype="Any" output="false">
- <cfset appendMessage( 'onCacheAdded' ) />
- </cffunction>
-
- <cffunction name="onCacheRemoved" access="public" returntype="Any" output="false">
- <cfset appendMessage( 'onCacheRemoved' ) />
- </cffunction>
-
- <cffunction name="onElementPut" access="public" returntype="Any" output="false">
- <cfset appendMessage( 'onElementPut' ) />
- </cffunction>
-
- <cffunction name="onElementExpired" access="public" returntype="Any" output="false">
- <cfset appendMessage( 'onElementExpired' ) />
- </cffunction>
-
- <cffunction name="onElementRemoved" access="public" returntype="Any" output="false">
- <cfset appendMessage( 'onElementRemoved' ) />
- </cffunction>
-
- <cffunction name="onElementsRemoveAll" access="public" returntype="Any" output="false">
- <cfset appendMessage( 'onElementsRemoveAll' ) />
- </cffunction>
- </cfcomponent>