CacheBox: ColdFusion 901: Custom Cache Regions Not Being Created

Hello All,

Using the latest ColdBox on development branch…

I’ve created some new cache regions in my CacheBox config that implement “CFColdBoxProvider”. Because CFColdBoxProvider extends CFProvider, I expected to see ColdBox create new custom namespaces within the ColdFusion managed EHCache; however, I do not see custom regions within EHCache–I only see “template” and “object”.

Looking into the code of CFProvider I wonder if its because the cache is not added using something like “cacheCreate(argumentCollection=myProps)”.

Here is a post by Rob Brooks-Bilson (aka bed jumper) that got me thinking:
Here is a direct link to the CFProvider (around line 196)

Is this a bug, or, am I misunderstanding?



Hey Aaron,

Yes the CFProvider should be creating these custom regions for you. I
just verified the functionality and wrote a function to abstract it:

  function cacheTest() {

    var cacheManager = createObject("java",
    var cacheName = "userTest";

    writedump(var= cacheManager.getCacheNames(), label="Before Invalid
get" );

    cacheGet( "___invalid___", cacheName );

    writedump(var= cacheManager.getCacheNames(), label="After Invalid
get" );


    writedump(var= cacheManager.getCacheNames(), label="After
Cleanup" );


You should see the defined region show up in the After Invalid get
dump. If cacheGet throws an error can you post the error? It is
working on several of our servers running CF 9.01, CB-Development