Problem with cache definition in Application.cfc

Hi,

I have just set up a Lucee 5.1.1.65 on my Mac and I’m having trouble with
my cache connections. I have the following code in my Application.cfc:

this.cache.connections[“MonitorPrograms”] = {
class: ‘org.lucee.extension.cache.eh.EHCache’
, bundleName: ‘ehcache.extension’
, bundleVersion: ‘2.10.0.20’
, storage: false
, custom: {“bootstrapAsynchronously”:“true”, “replicatePuts”:“true”, “automatic_hostName”:"", “bootstrapType”:“on”, “maxelementsinmemory”:“10000”, “manual_rmiUrls”:"", “distributed”:“off”, “automatic_multicastGroupAddress”:“230.0.0.1”, “memoryevictionpolicy”:“LRU”, “replicatePutsViaCopy”:“true”, “timeToIdleSeconds”:“86400”, “maximumChunkSizeBytes”:“5000000”, “automatic_multicastGroupPort”:“4446”, “listener_socketTimeoutMillis”:“120000”, “timeToLiveSeconds”:“86400”, “diskpersistent”:“true”, “manual_addional”:"", “replicateRemovals”:“true”, “replicateUpdatesViaCopy”:“true”, “automatic_addional”:"", “overflowtodisk”:“true”, “replicateAsynchronously”:“true”, “maxelementsondisk”:“10000000”, “listener_remoteObjectPort”:"", “asynchronousReplicationIntervalMillis”:“1000”, “listener_hostName”:"", “replicateUpdates”:“true”, “manual_hostName”:"", “automatic_timeToLive”:“unrestricted”, “listener_port”:"", “eternal”:“true”}
, default: ‘’
};

Code hier eingeben…

When I create a index.cfm try to add something to the cache, like:

cachePut(id=“test”,value=“Hello World”,cacheName=“MonitorPrograms”);

Code hier eingeben…

It throws an error saying: there is no cache with name [MonitorPrograms].

I have not configured cache anywhere else (Server Admin, Web Admin)

Any idea, what could be the reason?

That should work but you also need to define it as default for object cache maybe?

Mark Drew

  • Sent by typing with my thumbs.> On 11 Feb 2017, at 12:12, Lars Hueper <@Lars_Hueper> wrote:

Hi,

I have just set up a Lucee 5.1.1.65 on my Mac and I’m having trouble with my cache connections. I have the following code in my Application.cfc:

this.cache.connections[“MonitorPrograms”] = {
class: ‘org.lucee.extension.cache.eh.EHCache’
, bundleName: ‘ehcache.extension’
, bundleVersion: ‘2.10.0.20’
, storage: false
, custom: {“bootstrapAsynchronously”:“true”, “replicatePuts”:“true”, “automatic_hostName”:"", “bootstrapType”:“on”, “maxelementsinmemory”:“10000”, “manual_rmiUrls”:"", “distributed”:“off”, “automatic_multicastGroupAddress”:“230.0.0.1”, “memoryevictionpolicy”:“LRU”, “replicatePutsViaCopy”:“true”, “timeToIdleSeconds”:“86400”, “maximumChunkSizeBytes”:“5000000”, “automatic_multicastGroupPort”:“4446”, “listener_socketTimeoutMillis”:“120000”, “timeToLiveSeconds”:“86400”, “diskpersistent”:“true”, “manual_addional”:"", “replicateRemovals”:“true”, “replicateUpdatesViaCopy”:“true”, “automatic_addional”:"", “overflowtodisk”:“true”, “replicateAsynchronously”:“true”, “maxelementsondisk”:“10000000”, “listener_remoteObjectPort”:"", “asynchronousReplicationIntervalMillis”:“1000”, “listener_hostName”:"", “replicateUpdates”:“true”, “manual_hostName”:"", “automatic_timeToLive”:“unrestricted”, “listener_port”:"", “eternal”:“true”}
, default: ‘’
};
Code hier eingeben…

When I create a index.cfm try to add something to the cache, like:
cachePut(id=“test”,value=“Hello World”,cacheName=“MonitorPrograms”);
Code hier eingeben…

It throws an error saying: there is no cache with name [MonitorPrograms].

I have not configured cache anywhere else (Server Admin, Web Admin)

Any idea, what could be the reason?


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/0da517a0-3404-4acb-8f9a-279f692ba2d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I only got this to work by removing the “connections” segment of the nested structure. Thus, it would be:

this.cache[“MonitorPrograms”] = {…}

Then, it worked for me and dumping the application settings shows that it somehow got pulled into the “connections” struct internally, somehow.