Weak cache hash table stores the items that have been removed from the cache, that have not yet been run through the garbage collection process. Entries in this table have been tagged as weak, indicating that they will be passed through the garbage collection process as soon as no further references are found for them. All items will be having weak references.
Scenario
If the system maintains a reference to an item that has been removed from the cache, it would continue to used the item. When a new item with the same ID is created later, the repository can no longer synchronize all of the changes made. To prevent this, whenever an item is removed from the cache, it is added to a weak reference Hashtable. When an item is not found in the cache, the repository references this Hashtable. If the item it found, it is added back to the cache.
Scenario
If the system maintains a reference to an item that has been removed from the cache, it would continue to used the item. When a new item with the same ID is created later, the repository can no longer synchronize all of the changes made. To prevent this, whenever an item is removed from the cache, it is added to a weak reference Hashtable. When an item is not found in the cache, the repository references this Hashtable. If the item it found, it is added back to the cache.
No comments:
Post a Comment