Skip to content

Commit 70f31d7

Browse files
author
Blair McKenzie
committed
FC-3104 update to key creation to exclude underscores
1 parent 81b5cd7 commit 70f31d7

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/lib/objectBroker.cfc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<cfargument name="typename" required="true" type="string">
5454

5555
<cfif isCacheable(typename=arguments.typename,action="read")>
56-
<cfreturn cachePull("#rereplace(application.applicationname,'[^\w\d]','','ALL')#_#arguments.typename#_#arguments.objectid#") />
56+
<cfreturn cachePull("#rereplace(application.applicationname,'[^a-zA-Z\d]','','ALL')#_#arguments.typename#_#arguments.objectid#") />
5757
<cfelse>
5858
<cfreturn structnew() />
5959
</cfif>
@@ -99,7 +99,7 @@
9999
hashKey="#arguments.hashKey#"
100100
) />
101101

102-
<cfset stCacheWebskin = cachePull("#rereplace(application.applicationname,'[^\w\d]','','ALL')#_#webskinTypename#_#arguments.objectid#_#dateformat(arguments.datetimeLastUpdated,'yyyymmdd')##timeformat(arguments.datetimeLastUpdated,'hhmmss')#_#arguments.template#_#hash(stResult.webskinCacheID)#") />
102+
<cfset stCacheWebskin = cachePull("#rereplace(application.applicationname,'[^a-zA-Z\d]','','ALL')#_#webskinTypename#_#arguments.objectid#_#dateformat(arguments.datetimeLastUpdated,'yyyymmdd')##timeformat(arguments.datetimeLastUpdated,'hhmmss')#_#arguments.template#_#hash(stResult.webskinCacheID)#") />
103103

104104
<cfif not structisempty(stCacheWebskin) AND
105105
structKeyExists(stCacheWebskin, "datetimecreated") AND
@@ -611,7 +611,7 @@
611611
hashKey="#arguments.stCurrentView.hashKey#"
612612
) />
613613

614-
<cfset cacheAdd("#rereplace(application.applicationname,'[^\w\d]','','ALL')#_#arguments.typename#_#arguments.objectid#_#dateformat(arguments.datetimeLastUpdated,'yyyymmdd')##timeformat(arguments.datetimeLastUpdated,'hhmmss')#_#arguments.template#_#hash(stCacheWebskin.webskinCacheID)#",stCacheWebskin,stCacheWebskin.cacheTimeout*60) />
614+
<cfset cacheAdd("#rereplace(application.applicationname,'[^a-zA-Z\d]','','ALL')#_#arguments.typename#_#arguments.objectid#_#dateformat(arguments.datetimeLastUpdated,'yyyymmdd')##timeformat(arguments.datetimeLastUpdated,'hhmmss')#_#arguments.template#_#hash(stCacheWebskin.webskinCacheID)#",stCacheWebskin,stCacheWebskin.cacheTimeout*60) />
615615

616616
<cfreturn true />
617617

@@ -626,7 +626,7 @@
626626
<cfargument name="template" required="true" type="string">
627627

628628
<cfset var i = "" />
629-
<cfset var regex = "^#rereplace(application.applicationname,'[^\w\d]','','ALL')#_#arguments.typename#_#arguments.objectid#_[^_]+_#arguments.template#" />
629+
<cfset var regex = "^#rereplace(application.applicationname,'[^a-zA-Z\d]','','ALL')#_#arguments.typename#_#arguments.objectid#_[^_]+_#arguments.template#" />
630630
<cfset var aRemove = arraynew(1) />
631631

632632
<cfif not isdefined("application.objectbroker.#arguments.typename#")>
@@ -653,7 +653,7 @@
653653

654654
<cfif isCacheable(typename=arguments.typename,action="write") and structkeyexists(arguments,"key")>
655655
<cfset cacheAdd(
656-
"#rereplace(application.applicationname,'[^\w\d]','','ALL')#_#arguments.typename#_#arguments.key#",
656+
"#rereplace(application.applicationname,'[^a-zA-Z\d]','','ALL')#_#arguments.typename#_#arguments.key#",
657657
arguments.stObj,
658658
application.objectbroker[arguments.typename].timeout
659659
) />
@@ -737,7 +737,7 @@
737737
</cfif>
738738

739739
<!--- Remove the object itself and it's webskins --->
740-
<cfset key = "#rereplace(application.applicationname,'[^\w\d]','','ALL')#_#arguments.typename#_#i#" />
740+
<cfset key = "#rereplace(application.applicationname,'[^a-zA-Z\d]','','ALL')#_#arguments.typename#_#i#" />
741741
<cfset cacheFlush(key) />
742742

743743
</cfloop>

0 commit comments

Comments
 (0)