Comments (2)
This would be a big optimization for some access patterns. Ill take some time to think about the changes need for this.
Off hand I believe we'd have too:
- Which the store to use a UUID per store cachedir (not per object), to avoid issues with multiple stores on the same system trying to cleanup each others files. *Or we use filelocks but meh..
- Change OpenFile so it pulls the metadata first, then uses the metadata Hash to check for the presence of the cached file with the same Hash.
- Update the LastModified data for the cache file each time it's Opened?
- Keep a counter of Opens on the cache file, increment in OpenFile and decrement in obj.Close(). *Or use filelocks...
- Make a number of changes to https://github.com/lytics/cloudstorage/blob/master/cachecleaner.go to have it be smarter about what to clean up... Check openfile counts,
- Possibly : make the cache cleanup configurable with settings so the files can be cleaned up by LeastRecently used: MaxFileCount, MaxAge, MaxBytes... We could get even smarting and enforce a %free for the disk [Shrug].
from cloudstorage.
This would be great, looks like it has been sitting a while.
As far as s3 goes we could utilize the ETag to verify if the backend file has changed.
from cloudstorage.
Related Issues (20)
- google storage type BucketLifecycleRuleCondition field Age change type to *int64 HOT 2
- AWS S3 write closer does not wait for the inner goroutine to close
- Add support for Azure Blob Storage
- Add support & Interface for Event Based File Listening Model
- embed os.FileInfo in object as interface HOT 1
- local-fs has different folder paths than the cloud (google, aws)
- localfs NewWriter, should use O_TRUNC ? HOT 3
- should be s3 not google HOT 1
- Overwriting behavioral difference between stores types, when using store.NewWriter... HOT 4
- improve sftp support
- sftp improvements
- box.com integration
- S3 Copy/Move performance optimizations HOT 1
- awss3 List method ignores NextMarker
- awss3 List does not call query ApplyFilters HOT 2
- localfs does not remove the cachefile on object.Close() HOT 7
- Tests failing after I modified Move/Copy test cases to use variable len payloads
- Using the Google auth for JWT files w/ out a scope can lead to confusion.
- AWS S3 set endpoint to be used in yandex s3 HOT 3
- LocalFS Prefix Query Does Not Match Filename Prefixes
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 cloudstorage.