You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c.f. #62, some devices (embedded, micro-computers) do not have large amount of memory to allocate to image caches, but may have access to persistent e.g. nvram space. This feature would add the option for users to enable disk-based cache.
A library that could be used for this is filecache.
Design topics
This feature should be optional, because using a file-based cache is likely to noticeably degrade scrolling performance -- loading images from disk is certain to be slower than pulling them from memory cache. Users will likely only want to use this feature in certain constrained cases. There is probably no advantage to enabling disk caching for any other reason, given that stmps is streaming megabytes of music data, and the tens of kilobytes of extra album art data is likely to be unnoticeable.
Special attention should be paid to cache invalidation. OpenSubsonic dictates no mechanism for detecting whether assets have changed on the server. This means there is no reliable cross-server way to determine if an asset has changed, which means the only way to check is to fetch the asset and compare it to what is cached. This will add significant overhead; the consequence of not doing this is that cover art can easily go stale. How do we handle this? Another hotkey for clearing the persistent cache? Automatically purging the disk cache when the application exits, to ensure asset correctness on next run?
Note that this last point is already an issue with the memory cache, with the exception that since it's a memory cache, clearing the cache is a matter of exiting the program. Extra attention will only be needed because disk caches are persistent across runs. The easiest solution would be to emulate the current in-memory behavior by purging the disk cache on application exit; in any case, a decision about behavior needs to be made.
The text was updated successfully, but these errors were encountered:
c.f. #62, some devices (embedded, micro-computers) do not have large amount of memory to allocate to image caches, but may have access to persistent e.g. nvram space. This feature would add the option for users to enable disk-based cache.
A library that could be used for this is filecache.
Design topics
This feature should be optional, because using a file-based cache is likely to noticeably degrade scrolling performance -- loading images from disk is certain to be slower than pulling them from memory cache. Users will likely only want to use this feature in certain constrained cases. There is probably no advantage to enabling disk caching for any other reason, given that stmps is streaming megabytes of music data, and the tens of kilobytes of extra album art data is likely to be unnoticeable.
Special attention should be paid to cache invalidation. OpenSubsonic dictates no mechanism for detecting whether assets have changed on the server. This means there is no reliable cross-server way to determine if an asset has changed, which means the only way to check is to fetch the asset and compare it to what is cached. This will add significant overhead; the consequence of not doing this is that cover art can easily go stale. How do we handle this? Another hotkey for clearing the persistent cache? Automatically purging the disk cache when the application exits, to ensure asset correctness on next run?
Note that this last point is already an issue with the memory cache, with the exception that since it's a memory cache, clearing the cache is a matter of exiting the program. Extra attention will only be needed because disk caches are persistent across runs. The easiest solution would be to emulate the current in-memory behavior by purging the disk cache on application exit; in any case, a decision about behavior needs to be made.
The text was updated successfully, but these errors were encountered: