Using automatic reads to control which files are cached

Suggestions around PrimoCache
Post Reply
GoldenSun3DS
Level 3
Level 3
Posts: 15
Joined: Wed Mar 09, 2022 9:52 pm

Using automatic reads to control which files are cached

Post by GoldenSun3DS »

From what I understand, Primocache does not know what files it is caching, so it cannot control which files it caches. So I have an idea: Have Primocache schedule automatic reads of certain files and folders to force certain behavior with the cache prioritization.

I'd seen ideas posted of only caching small files (idea being that big files go at a good enough speed on HDD but small files are really slow on HDDs), or making certain folders stay in the cache, but the answer has been that it can't do that because it works with blocks and doesn't know what files it is caching. So then how about for certain options, primocache reads a certain file a bunch of times to make it change its caching behavior to the desired result?

This would be in the form of various options in settings that would have primocache read certain files to trigger a desired change in caching behavior.

For the small files idea, you could have Primocache set to read small files while the storage drive isn't being used much. You could have an option to have Primocache read media files (MP4s, MKVs, etc) for the usecase of a video editor who would like video files to be prioritized for faster/smoother video editing. You could have an option for newly written files to disk automatically be read once immediately so that it has a chance to be cached. You could have an option to pin certain folders and files to be periodically read to force it to stay in the cache, regardless of how often you use it.

There are lots of ways that you could use strategic reads to control how Primocache's caching behavior functions. I'm not a programmer, so I'll leave the details of the specifics to the professionals, but this sounds like a good idea to work off of.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Using automatic reads to control which files are cached

Post by Support »

Yes, this is one of ways we have considered. Thank you for your suggestions!
Post Reply