Custom Caches using CB's CFProvider

I'm trying to implement custom user caches introduced in ACF 9.01 and
it appears that CFProvider only half supports them.

A number of the functions in CFProvider that call CF's cache*
functions do not pass in the configured cacheName. Most importantly
the cachePut and cacheGet functions.

Am I missing something? Or is this not completed yet in the dev
branch?

thanks,

.brett

I thought they did but maybe I missed something. Can you do a pull request ?

Pull request sent.

I also added support for configuration parameters for your user
defined caches so you do not have to edit the ehCache.xml file.

.brett

Dude you rock

Brett/Luis/Community,

It looks like this pull request (link below) is what I am asking about on my thread from yesterday (link below). Is the expectation that EHCache will create new namespaces matching those in the CacheBox config file? If so, I do not see that behavior.

Also, my machine is working as expected, but, most machines are having an issue with line 140 in the GitHub pull request. The method calls get(‘invalid’’) but the get method is complaining about a null value being returned. Any thoughts?

Links
GitHub Pull Request: https://github.com/webflint/coldbox-platform/commit/8e8a652a16875213974666b77a23e291a155555c
Whole File from Pull Request: https://github.com/webflint/coldbox-platform/blob/8e8a652a16875213974666b77a23e291a155555c/system/cache/providers/CFProvider.cfc
Thread from Yesterday: https://groups.google.com/forum/#!topic/coldbox/hnw_HGA9hqc

Thanks community!

Aaron

I should note, I’ve verified the same version of ColdFusion running on all machines.

Aaron, why would a get(‘invalid’) throw invalids? Not sure about that one. What would you recommend

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

I’m not sure. Yesterday two machines started complaining about a null value in the get() method. I verified all the arguments and local variables were not null.

I’m deploying to a third machine today and will report back if I see this issue again.

Here is a stack trace. Looks like EHCache does not like the initial call?

java.lang.NullPointerException at net.sf.ehcache.Cache.searchInDiskStoreWithStats(Cache.java:1755) at net.sf.ehcache.Cache.get(Cache.java:1337) at net.sf.ehcache.Cache.get(Cache.java:1306) at coldfusion.tagext.io.cache.ehcache.GenericEhcache.get(GenericEhcache.java:75) at coldfusion.tagext.io.cache.CacheTagHelper.getFromCache(CacheTagHelper.java:237) at coldfusion.runtime.CFPage.CacheGet(CFPage.java:8183) at cfCFProvider2ecfc291528532$funcLOOKUPQUIET.runFunction(C:\inetpub\v4stage\atv4\model\coldbox\CFProvider.cfc:380) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582) at cfCFProvider2ecfc291528532$funcLOOKUP.runFunction(C:\inetpub\v4stage\atv4\model\coldbox\CFProvider.cfc:369) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) at cfColdbox2ecfc705088245$funcPROCESSCOLDBOXREQUEST.runFunction(C:\inetpub\v4stage\lib\frameworks\coldbox35\system\Coldbox.cfc:267) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) at cfApplication2ecfc568776218$funcONREQUESTSTART.runFunction(C:\inetpub\v4stage\atv4\Application.cfc:149) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88) at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:258) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at com.intergral.fusionreactor.filter.FusionReactorFilter.k(FusionReactorFilter.java:637) at com.intergral.fusionreactor.filter.FusionReactorFilter.d(FusionReactorFilter.java:266) at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:171) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

hmm, why would that be? Not even something we could trap right?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Aaron -

Did you see the function I posted to the other thread that abstracts
invalid get? You can try that outside of the ColdBox context.

.brett