Storing cache on cloud ? #186
-
Hi, I am planning, as a study project, to create a dashboard and to deploy it, probably on AWS Beanstalk. The thing that worries me is that the cache folder can get quite big after having loaded few sessions, and it may not be practical to rely on the EC2 storage capacity in the long run. Is there a way to configure the cache so that it writes elsewhere than on the local machine, for example a S3 bucket ? I understand that it would slow down the loading a bit but it's not a problem. Thanks a lot :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
With how the cache currently works, this is only possible if you can map your cloud storage as some kind of network drive. If this is not feasible, the current cache implementation needs to be modified slightly. It wouldn't be a huge amount of work. A bit of funtionality would need to be factored out into a storage backend (read, write, check availabilty, create path/url/uri from session and api method name). After that, you could provide your own storage backend that provides these functions. If you're interested in making these changes as a pull request, I can give you some guidance on that. I guess modularization would generally be an improvement here although not many people will need it. |
Beta Was this translation helpful? Give feedback.
With how the cache currently works, this is only possible if you can map your cloud storage as some kind of network drive.
If this is not feasible, the current cache implementation needs to be modified slightly. It wouldn't be a huge amount of work. A bit of funtionality would need to be factored out into a storage backend (read, write, check availabilty, create path/url/uri from session and api method name). After that, you could provide your own storage backend that provides these functions.
If you're interested in making these changes as a pull request, I can give you some guidance on that. I guess modularization would generally be an improvement here although not many people will need…