Cachebox doesn't announce afterCacheRegistration


Following the example here under proactive loading:

This looks pretty straightforward. We set up an interceptor and registered it in our Coldbox app. We set up a cache in Cachebox's config file. We've tested each separately and can access the cache from our app and fire events in the interceptor.

But the interceptor doesn't ever receive an announcemnet for afterCacheRegistration. There is a Google groups thread about this from 2012:!topic/coldbox/qr9KShkR7dw

One of two things is going on:

1) (more likely) There's an extra step we've neglected such that Coldbox isn't listening for this event correctly (in which case, we'll add it to the Cachebox docs when we find out what it is)

2) The event isn't firing correctly.

If it's #2 and this has been around since 2012, is there a more recent best practice for populating a cache? We're shifting a lot of our caching solutions to Cachebox in anticipation of moving to Lucee and Redis (so we can just change the cache provider to the Ortus Redis cache when it's ready to go) and this is the first problem we've had as it's quite simple otherwise.


Luis Majano
June 28, 2018, 4:54 PM

I will update the docs to mention that pro-active loading can occurr in multiple stages. WHen you use ** afterCacheRegistration** is when you are in standalone mode, not in ColdBox mode. Unfortunately, the chicken and the egg problem arises. So for now you can use alternative entry points to listen like: afterConfigurationLoad or afterAspectsLoad


Luis Majano


Samuel W. Knowlton