Skip to content

Commit

Permalink
updating code for wheels 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenke committed Jan 14, 2010
1 parent cb11b50 commit d710297
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions cachebox.cfc
@@ -1,34 +1,9 @@
<cfcomponent>
<cffunction name="init">
<cfset this.version = "0.9.4">
<cfset this.version = "1.0.0">
<cfreturn this>
</cffunction>

<cffunction name="$insertDefaults" returntype="struct" access="public" output="false">
<cfargument name="name" type="string" required="true">
<cfargument name="input" type="struct" required="true">
<cfargument name="reserved" type="string" required="false" default="">
<cfscript>
var loc = {};
if (application.wheels.environment != "production")
{
if (ListLen(arguments.reserved))
{
loc.iEnd = ListLen(arguments.reserved);
for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
{
loc.item = ListGetAt(arguments.reserved, loc.i);
if (StructKeyExists(arguments.input, loc.item))
$throw(type="Wheels.IncorrectArguments", message="The '#loc.item#' argument is not allowed.", extendedInfo="Do not pass in the '#loc.item#' argument. It will be set automatically by Wheels.");
}
}
}
StructAppend(arguments.input, application.wheels.functions[arguments.name], false);
loc.returnValue = arguments.input;
</cfscript>
<cfreturn loc.returnValue>
</cffunction>

<cffunction name="$addToCache" returntype="void" access="public" output="false">
<cfargument name="key" type="string" required="true">
<cfargument name="value" type="any" required="true">
Expand Down Expand Up @@ -69,13 +44,13 @@
var loc = {};
if (Len(arguments.category))
{
loc.returnValue = application.wheels.cache[arguments.category].getHeadCount();
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].getHeadCount();
loc.returnValue = loc.returnValue + application.wheels.cache[loc.key].getSize();
}
}
</cfscript>
Expand Down
Binary file modified releases/CacheBox-0.1.zip
Binary file not shown.

0 comments on commit d710297

Please sign in to comment.