Is it possible to limit the size of Hibernate second-level-cache for a specific entity?
-
11-11-2019 - |
سؤال
I have a scenario where Hibernate second-level-cache is enabled and I'd like to cache an entity for which 1000 instances are created every day and retained for 8 years but the queries only deal with the most recent 2 days. I would like to avoid having to create a history table because then for the rare cases for historical lookup, the code is dependent on the date.
Is it possible in Hibernate, with Infinispan as the Level-2 provider, to configure very specifically, a particular cache with specific attributes (eviction policy, size, etc.) that Hibernate should use for entity Foo?
لا يوجد حل صحيح
لا تنتمي إلى StackOverflow