Add ClearDisk interface #102
Comments
@digitalbuddha it should also provide an interface for whole disk cache clear I suppose. But that I guess would be exposed internally from the FileSystem ? |
Why would one want to clear one without the other? (cache & persistence) Why shouldn't it be mandatory for persisters to be able to clear their data? |
For now backwards compatibility. I'll Deprecated and consider removing in v2. |
What about defining a common interface like |
Not following, mind explaining what you mean? Also the memory cache is currently a guava cache which we don't have control over interface. I guess it can be wrapped but yeah mind explaining what you mean? |
If I understand you correctly, you want to give the option to add a So my suggestion is to instead of having a separate Or do I get you completely wrong? |
Sure that makes sense. I was trying to handle the lambda case in the way that |
@PaulWoitaschek I'm starting to side with you. If there is a memory and disk cache why would someone only want to clear the memory one? I'll instead rename |
@digitalbuddha Is there a chance to have memory and disk cache side-by-side? |
You can have both but I don't see a use case where you want to clear your memory cache but not your disk. If that is your use case you can always not implement clearable in your persister |
in conjunction with #68 we should have a way to clear memory and disk cache. Current idea is add:
Store:
void clear(BarCode barCode);
Builder:
builder.diskClearer(barcode->//deletes entry from user's persister);
The text was updated successfully, but these errors were encountered: