simiane
07/14/2022, 3:17 PMgetCache('MyCacheName').get('MyCacheKey')
a bunch of times (I'm doing it 10,000 times in a loop), I can get the error to appear.
I assume it's some kind of race condition. Cachebox is instantiated as a singleton in the server scope and called by multiple sites.Patrick S
07/14/2022, 3:39 PMsimiane
07/14/2022, 3:42 PMlmajano
07/14/2022, 4:57 PMlmajano
07/14/2022, 4:58 PMlmajano
07/14/2022, 4:58 PMsimiane
07/15/2022, 7:58 AMLocal.CacheKey = 'object_33p79drt94_template_9_';
for (i=1; i<=10000; i++) {
writeoutput(i & '<br />');
Local.ObjectTemplate = Server.CacheBox.getCache('ObjectCache').get(Local.cacheKey);
}
If I run that from two separate tabs in quick succession, one or both of them will return the error:
The parameter 1 of function ToBinary, which is now /templates/CMSTemplates/Objects/collapsible_snippet.cfm must be a base-64 encoded string.
simiane
07/15/2022, 8:00 AMsimiane
07/15/2022, 8:19 AMLocal.CacheKey = 'testSimpleString';
Server.CacheBox.getCache('ObjectCache').set(Local.cacheKey, 'Test simple string');
for (i=1; i<=10000; i++) {
writeoutput(i & '<br />');
Local.ObjectTemplate = Server.CacheBox.getCache('ObjectCache').get(Local.cacheKey);
}
Throws the error:
Error occurred while performing ObjectLoad: the contents of file [B@67a1d91f are damaged or invalid.
simiane
07/20/2022, 8:24 AM