Comments (3)
I don't think there is a good generic way for us to handle controlling max size for persisters. To unpack a bit more what is your expectation when max size is reached? Should we throw an exception? Should we overwrite oldest made file or oldest accessed? Should we allow priority for some files to not get deleted? What if someone's persister is appending data to a single file and they want to control max size of that file?
Personally, I'd recommend handling the logic yourself within the read/write
function of your persister implementation
from store.
@digitalbuddha Thanks for your speedy response. I think I misunderstood the scope of this project. I expected to find a built-in implementation of a FileSystemPersister
and a FileSystemPolicy
that mirrored the MemoryPolicy
.
To answer your questions:
Should we overwrite oldest made file or oldest accessed?
- This should be specified by a
FileSystemPolicy
Should we allow priority for some files to not get deleted?
- This should be specified by a
FileSystemPolicy
What if someone's persister is appending data to a single file and they want to control max size of that file?
- This feels beyond the remit of a caching library.
Anyhow, thanks again for your explanation here.
from store.
I would suggest that the documentation could be more explicit. In particular the following text from the README:
You can also define how your Store will cache data in-memory and on-disk.
led me to think that file system caching policy was supported.
from store.
Related Issues (20)
- [Feature Request] Add converter to StoreBuilder HOT 7
- [Feature Request] get() and fresh() extensions on MutableStore
- [Feature Request] HOT 1
- Inconsistent SourceOfTruth argument types HOT 2
- [BUG] Fix breaking changes with source of truth HOT 7
- [Documentation] Update Store documentation HOT 1
- Integrate website with CI
- [Feature Request] The stream of StoreResponse<T> should emit Loading(origin = SourceOfTruth) HOT 1
- [Question] Data with nested keys HOT 1
- [BUG] Stop with the breaking API changes in beta HOT 4
- [BUG] 5.0.0-beta02 breaks StoreReadRequest.cached + Validator HOT 2
- [BUG] Cached(refresh = true) will collect SoT reader twice HOT 3
- [Feature Request] fromLocalToOutput converter method went missing
- [BUG] Deadlock during synchronization in MutableStore
- [BUG] Examples on https://mobilenativefoundation.github.io/Store/mutable-store/building/builder/ are wrong
- [Feature Request] Common Testing Utils
- [BUG] Documentation "Edit this page" button 404's HOT 1
- Store Not Fetching or Read/Writing HOT 6
- CLA HOT 1
- [Question] Why should anyone consider using Store if they are already using NetworkBoundResource concept/framework? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from store.