[jboss-user] [JBoss Cache: Core Edition] - Hibernate + JBoss Cache does not cache inserted items?

onur.aktas do-not-reply at jboss.com
Thu Feb 5 11:13:00 EST 2009


Hi,

I have a query cache simple as

@NamedQueries({@NamedQuery(query = "select e from Event e",
  |                            name = "Event.findAll",                                
  |                            hints = {@QueryHint(name = "org.hibernate.cacheable", value = "true"),
  |                                     @QueryHint(name="org.hibernate.cacheRegion", value = "EventRegion")                                    
  |                                    }
  |                            )
  |                }
  |               )
  | @Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL)

It successfully caches when i only do SELECT. 
However, when i do INSERT then SELECT operation, it does NOT  cache inserted item, and it again SELECTS from database.

Is it a normal behavior or am i doing something wrong?

Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207417#4207417

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207417



More information about the jboss-user mailing list