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
{{ message }}
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
I was wondering if there is any way to remove a specific Key from the Cache without clearing the whole Cachelevel.
Till now, "deleted" Keys are just set nil, which is a terribly inefficient way of handling unwanted dataentries.
Think of deleting a simple Object, that the User does not need anymore. What is the best way of handling that case in Carlos?
The text was updated successfully, but these errors were encountered:
Currently, there is no way to remove a value for specific key from a cache level, however, I do think that it does make sense to have such functionality in the library hence I've created a PR for it. See #194
Edit: remove(_:) is now available in the latest release (1.2.0)
Hi @ivanlisovyi ,
very cool for you to implement this feature so quickly!
I have tried to update from 1.1.1 to 1.2.0. And i have noticed some crazy Bugs of my common Requests. Carlos does not answer to get or set Request. For Example a simple get Request does not work anymore, because the receive Completion is not called anymore. Further no Carlos print outs are drawn anymore.
I have tried to remove the Package and install it again. Did not work.
(Xcode 12.0 - Building for iOS 14.6)
Maybe you have some idea why it is not working anymore.
Here my Code for a simple get Request of an the Cache unknown Key:
self.cache = MemoryCacheLevel().compose(DiskCacheLevel<String, NSData>())
cache.get(key.rawValue)
.sink(receiveCompletion: {result in
if case let .failure(error) = result {
print("An Failure was received - > Is not called")
completion(.failure(LocalStorageErrors.retrieveError))
}
if case let .finished = result {
print("Finished Call to Cache - > Is called")
}
}, receiveValue: { value in
print("Any Result received - > Is not called")
}).store(in: &cancellables)
I was wondering if there is any way to remove a specific Key from the Cache without clearing the whole Cachelevel.
Till now, "deleted" Keys are just set nil, which is a terribly inefficient way of handling unwanted dataentries.
Think of deleting a simple Object, that the User does not need anymore. What is the best way of handling that case in Carlos?
The text was updated successfully, but these errors were encountered: