Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated cachebox/wheels

  • Loading branch information...
commit f6477269eb6954eb905cfe15abdec8a662a91fe6 1 parent d710297
@mhenke authored
Showing with 8 additions and 14 deletions.
  1. +8 −14 cachebox.cfc
  2. BIN  releases/CacheBox-0.1.zip
View
22 cachebox.cfc
@@ -38,23 +38,17 @@
<cfset application.wheels.cache[arguments.category].expire(key) />
</cffunction>
-<cffunction name="$cacheCount" returntype="numeric" access="public" output="false">
- <cfargument name="category" type="string" required="false" default="">
+<cffunction name="$clearCache" returntype="void" access="public" output="false">
+ <cfargument name="category" type="string" required="false" default="#structKeyList(application.wheels.cache)#">
<cfscript>
- var loc = {};
- if (Len(arguments.category))
- {
- loc.returnValue = application.wheels.cache[arguments.category].getSize();
- }
- else
- {
- loc.returnValue = 0;
- for (loc.key in application.wheels.cache) {
- loc.returnValue = loc.returnValue + application.wheels.cache[loc.key].getSize();
- }
+ var loc = {};
+ var agent = listToArray(category);
+ var i = 0;
+
+ for (i = 1; i lte arrayLen(agent); i = i + 1) {
+ application.wheels.cache[agent[i]].expire();
}
</cfscript>
- <cfreturn loc.returnValue>
</cffunction>
<cffunction name="$clearCache" returntype="void" access="public" output="false">
View
BIN  releases/CacheBox-0.1.zip
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.