0 Replies Latest reply on Feb 5, 2009 11:12 AM by onur.aktas

    Hibernate + JBoss Cache does not cache inserted items?


      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?