4 Replies Latest reply on Sep 12, 2006 3:47 AM by mrohad

    Entity Cache Question

    mrohad

      I've a DB table that we only add rows to it , we never update nither delete from this table.

      what kind of caching strategy do you recommend?
      CacheConcurrencyStrategy type I guess..

      Thanks

        • 1. Re: Entity Cache Question
          laszlo.fogas

          READ_ONLY i guess

          • 2. Re: Entity Cache Question
            mrohad

            but if I set the cache to be READ_ONLY how will the cache know I added a new row?
            Thanks!

            • 3. Re: Entity Cache Question
              laszlo.fogas

              You cache only the entity, not the query result. And you don't update the entity that's why you can use read_only cache which supposed to be the fastest.

              • 4. Re: Entity Cache Question
                mrohad

                ok , thanks..

                I rethought about that and i've 2 more question..

                1) I've 2 entities Event and EventText
                for each Event there are many EventText

                EventText is an entity that I am only inserting(never update/delete) but it hold one Event
                and Event is an entity that can be changed once in few weeks , can I still use READ_ONLY for EventText?

                2)now what about queries? I would like to query i.e. all Events that contains EventText.type=1 , can I cache this query?
                I thought to put TRANSACTIONAL cache on the Event entity and cache this queries , does it make sense?