ehcache

Terracotta With Hibernate and EHCache

Head swimming with the product name soup at http://www.terracotta.org. Need someone to help clarify what I need. Background: app has some "legacy" persistence code that does not use Hibernate, but has a home-grown cache implementation. New entities are Hibernate enabled. What I want: to use Terracotta for Hibernate 2nd level cache. I t...

Avoiding serialization in distributed EHCache

Is there a way to not use serialization and still use the EHCache disktore. I have nested objects , which are not serializable, which have to cached in a distributed ehcache. I can use JMS, to avoid serialization, and still achieve cache replication. But is there a way to avoid serialization to use the diskstore as well? Why isn't there...

When using ehcache, what synchronization do I need to do?

Let's say I start with a single CacheManager like this: private static CacheManager manager = CacheManager.create(); When I call getCache or addCache do I need to synchronize on the CacheManager first? When I call put or get on the Cache, should I synchronize on the Cache first? ...

How to temporarily disable read-only 2nd level cache hibernate strategy in Grails ?

In my grails application, some of my domain classes will never be changed by Users. However, some maintenance work is sometimes necessary, and administrator should be able to create/edit few instances from time to time (let's say twice a year). I would like to set a read-only 2nd level cache strategy for these domain classes (static ma...

Hibernate EntityManager Factory - EHCache

Hi all, I am having more problems with getting the entity manager factory up and running. Unfortunately, the error message is very vague. I'm not quite sure why it's not more descriptive, but it is what it is: Hibernate Startup log messages (trace level), no entities configured for brevity (same error message either way except all th...

hibernate and ehcache replication

Hi, I am working on a cache replication solution between nodes Node A - master node => Hibernate + Database + Ehcache as secondary cache Node B - regional node=> Ehcache as prmiary cache. no Hibernate Node B is used only as near-by cache for query. Now I am updating data (Say SudentInfo) in Node A, it gets persisted and cached correc...

ehcache LRU evicting recently used entries

Using Ehcache , after Java app works 2.5 days, I have this statistic cacheHits: 31185262, approximate 131 per sec cacheMisses: 4642979, approximate 19 per sec evictedCount: 4106931, approximate 17 per sec and last hour it looks like cacheHits: 60 per sec cacheMisses: 57 per sec evictedCount: 53 per sec size of cache=40...

Ehcache - Distributed RMI not working

Hi, I have this strange problem with ehcache 2.0 that I hope someone can help me with. I have set up a cluster of two hosts, A and B. I can see that heartbeats are received at both ends, so I'm pretty sure the networking and multicast stuff is working. The problem is that is I put an element into the cache at host A, I can see in the lo...

Ehcache disk store unclean shutdown

I'm using a cache with disk store persistence. On subsequent reruns of the app I'm getting the following error: net.sf.ehcache.store.DiskStore deleteIndexIfCorrupt WARNING: The index for data file MyCache.data is out of date, probably due to an unclean shutdown. Deleting index file MYCache.index Is there any way to fix that apart from...

ehcache update checker

12:18:55,541 INFO [UpdateChecker] New update(s) found: 2.0.0 [http://ehcache.org/news.html] How do I suppress ehcache checking for new update(s), this is happening while loading my j2ee application and when ehcache is getting initialized. ...

Using EHCache with ASP.NET?

I have heard of .NET APIs for memcached. Is there any equivalent for EHCache? I am envisioning a cluster of linux machines running EHCache, serving cached objects for a farm of ASP.NET webservers. Is this practical? Can this be done without installing Java on the ASP.NET servers? ...

Hibernate - EhCache - Which region to Cache associations/sets/collections ??

Hi all, I am a newcomer to hibernate. It would be great if someone could comment over the following query that i have: Say i have a parent class and each parent has multiple children. So the mapping file of parent class would be something like: parent.hbm.xml <hibernate-mapping > <class name="org.demo.parent" table="parent" lazy="tru...

hibernat createSQLQuery use CacheQuery?

Query query=getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery( "select... getHibernateTemplate().setCacheQueries(true); List result= query.list(); getHibernateTemplate().setCacheQueries(false); return result; may i know when i do manual "createSQLQuery" how to use cacheQuery? the above does...

Ehcache midnight/nightly expiration strategy

It's not immediately obvious to me how to set EhCache to expire an entire cache nightly/at midnight. I can easily do this programmatically via a job of some sort, but I wanted to know if there was a more "ehcache" way of doing it. Thanks in advance! ...

spring+hibernate+ehcache, how to clear all cache

i'm using 2nd level cache and query cache. may i know how to programatically clear all caches? ...

default caching time when using hibernate

when using hibernate 2nd level cache and query cache and not specifying anything inside ehcache.xml .what is the default caching time? ...

How do I programmatically disable the update checks for an Ehcache?

I know that the attribute "updateCheck" can be set in "false" in the XMLlike this: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false" monitoring="autodetect"> But I need to do this programmatically. How should I do it? ...

Coldfusion 8 and HTTP PUT - is there a way to PUT an object?

Hi all We are using EHCache with CF 8 to cache stuff on a central server using a RESTful interface over HTTP. I am trying to cache a cfquery object to the cache server. I can get this to work if I call EHCache direct (i.e. store it in a local cache) but if I try to cache on a remote server over HTTP I am running into problems. The co...

atomic writes to ehcache

Context I am storing a java.util.List inside ehcache. Key(String) --> List<UserDetail> The ordered List contains a Top 10 ranking of my most active users. Problem Concurrent 3rd party clients might be requesting for this list. I have a requirement to be as current as possible with regards to the ranking. Thus if the ranking is chan...

How to differentiate between time to live and time to idle in ehcache

The docs on ehache says: timeToIdleSeconds: Sets the time to idle for an element before it expires. i.e. The maximum amount of time between accesses before an element expires timeToLiveSeconds: Sets the time to live for an element before it expires. i.e. The maximum time between creation time and when an element expires. I understand...