You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But they aren't called in ALL other cases. They are not called in the case of removing ALL objects. In that case willRemoveAllObjectsBlock and didRemoveAllObjectsBlock blocks are called instead.
Also worth noting, if trimToDate is given a date of distantPast (should this be distantFuture ?) it will call removeAll instead of the normal trim hence also skipping calls to the willRemove/didRemove blocks
Anyways, with that background in mind, should the blocks be called in the case when an object is replaced ?
And what about when an object in the cache is replaced with an object it is .equal() to ?
The text was updated successfully, but these errors were encountered:
When an object in PINMemoryCache is replaced, the
willRemoveObjectBlock
and thedidRemoveObjectBlock
for the old object aren't called.They are called in most other cases when an object is removed via a call to
removeObjectAndExecuteBlocksForKey
. This happens inremoveObjectForKey
And when trimming in
trimMemoryToDate trimToCostLimit trimToCostLimitByDate
But they aren't called in ALL other cases. They are not called in the case of removing ALL objects. In that case
willRemoveAllObjectsBlock
anddidRemoveAllObjectsBlock
blocks are called instead.Also worth noting, if trimToDate is given a date of
distantPast
(should this bedistantFuture
?) it will call removeAll instead of the normal trim hence also skipping calls to the willRemove/didRemove blocksAnyways, with that background in mind, should the blocks be called in the case when an object is replaced ?
And what about when an object in the cache is replaced with an object it is .equal() to ?
The text was updated successfully, but these errors were encountered: