Questions tagged [evict]

To evict a part of memory is to clear its contents to make space for new data

52 questions
21
votes
2 answers

What does NHibernate Session.Evict do?

What does the following code snippet do? Why the use of Evict? private void DoEvict(customer cust) { AddressRepository.Evict(cust.Address); cust.Address = AddressRepository.Get(cust.Address.Id); }
DaSmart
  • 225
  • 1
  • 2
  • 6
10
votes
3 answers

Why is my entity not evicted from my second-level cache?

I’m using Hibernate 4.3.11.Final with Spring 3.2.11.RELEASE. I’m confused as to why my cache eviction isn’t working. I have this set up in my DAO … @Override @Caching(evict = { @CacheEvict("main") }) public Organization save(Organization…
Dave
  • 15,639
  • 133
  • 442
  • 830
8
votes
2 answers

Cache evict on one of multiple keys

In my application I have multiple cacheable methods with multiple keys: @Cacheable(cacheNames = "valueCodes", key = "{#value, #fieldId, #projectId}") @Cacheable(cacheNames = "fieldNames", key = "{#field, #value, #projectId}") @Cacheable(cacheNames =…
Glenn Van Schil
  • 1,059
  • 3
  • 15
  • 33
7
votes
1 answer

NHibernate caching issue - When to call Evict?

I've run into an apparent caching issue where what's being returned by NHibernate is not matching up with what's in the DB. I believe this is level2 cache data. It looks like I can use the Evict to do this, but when should the Evict method actually…
Brian
  • 6,910
  • 8
  • 44
  • 82
6
votes
1 answer

Is there a database based key eviction policy in redis when RAM is full

I am using 5 databases in my redis server. I want to evict keys belonging to a particular DB using LRU mechanism. Is it possible ? I read this: how-to-make-redis-choose-lru-eviction-policy-for-only-some-of-the-keys. But all my databases are using…
revs
  • 63
  • 7
5
votes
0 answers

Eviction for "memory" type is different from "count" type

I would like to use Infinispan as cache for image binary data (Java type byte[]). I assume that Infinispan default strategy is LIFO or similar strategy that prefers to keep most recently used/added cache entity. In my loadtest scenario I make four…
dma_k
  • 10,431
  • 16
  • 76
  • 128
3
votes
1 answer

Hazelcast - Oldest Entries Evicted First

I'm using hazelcast to store data that are important for a small time window (maybe 30 to 50 min, but no more than 60 min). The older the entry, the less important it is, meaning if we could get rid of some entries to avoid an OutOfMemory would be…
Francisco Spaeth
  • 23,493
  • 7
  • 67
  • 106
3
votes
1 answer

Hibernate firing unnecessary update.why?

I have three layers i.e Action,Service,DAO layers. I have loaded an object(of Employee class) from DB using hibernate with id 123.I have done some modifications to employee object.Later, I have create hibernate business object and done some…
Java P
  • 2,241
  • 6
  • 31
  • 45
2
votes
1 answer

How to force Eviction on a Kubernetes Cluster (minikube)

I am relatively new to Kubernetes, and have a current task to debug Eviction pods on my work. I'm trying to replicate the behaviour on a local k8s cluster in minikube. So far I just cannot get evicted pods happening. Can you help me trigger this…
2
votes
1 answer

LRU Cache Evict method implementation

If we are implementing a LRU cache using HashMap and DoublyLinkedList, What is the best way to implement evict() method with O(1) time complexity?
user3133925
2
votes
1 answer

How does MySQL evict pages from the buffer pool?

I am trying to understand the internals of MySQL. I do know that MySQL's buffer pool management has an old/young page list as shows here. And I do know about the flushing of old dirty pages, such as explained here and how to customize it here. I am…
Hadi
  • 945
  • 3
  • 10
  • 31
2
votes
0 answers

Skip elements to be cached by Guava Cache if maximumSize reached

Is there a way to not cache elements using Guava Cache if maximumSize reached? I'm looking for behaviour similar to "No ejection" option in couchbase: If No ejection is selected, no ejection of existing data occurs, and attempts to cache new data…
Stanislav
  • 61
  • 5
2
votes
2 answers

Is there a way to configure ehcache to only cache some numbers of elements in time order?

My current config is as below, I intended to only cache up to 30 elements and evict the oldest one when the number is more than 30:
Roy Ling
  • 1,592
  • 1
  • 14
  • 31
2
votes
1 answer

HazelCast max-idle-seconds :evict listener is not working

hazelcast configuration for the map is 120 com.test.listener.SessionListener
Vishnu Prabhakar
  • 310
  • 4
  • 17
2
votes
1 answer

Hazelcast map fifo eviction

Need to set a FIFO eviction policy on hazelcast Map. The idea is when the heap is occupied with 90% memory, the system will start freeing up oldest data. LRU and LFU does not work and the system can fill up 90% within minutes as well while not being…
rohit
  • 862
  • 12
  • 26
1
2 3 4