Proposed Features, and BugFixes to-do list - Discussion and Feedback #16
Replies: 3 comments 15 replies
|
New proposal - Remove Watchlist_Cache file completely.... is there actually any use for it? Whenever I run the script I want it to be accurate and up to date. I have mine set to 6 hours, and the script runs once or twice a day, so it's always 'expired' anyway. Why bother keeping it? Does anyone have a use for this existing? |
Proposal: Remove "Watched" media processing (seeking feedback)I'm reviewing the logic around how PlexCache-R decides when to move files back to the array, and wanted to get community input on a proposed simplification. Current behavior:The script currently fetches three types of media from Plex:
The "Watched" fetch pulls your full watch history (potentially thousands of items) to identify files that were recently marked as watched and should be moved back to the array. The problem:Fetching the entire watched history seems redundant. On a typical server, this could be 2,000-3,000+ items, but only a handful are actually on the cache drive. My thinking:When a file falls off OnDeck, it happens for one of these reasons:
In all cases, the file is no longer being actively accessed. The reason it left OnDeck doesn't matter for the caching decision, what matters is that it's no longer on OnDeck or Watchlist. Proposed change:Remove the "Watched" processing entirely. The logic simplifies to:
The Benefits:
Question for the community:Is there a use case I'm missing where knowing the watched status specifically matters for caching decisions? Or does the simpler "on OnDeck/Watchlist = keep, otherwise = move back" logic cover your needs? |
|
@StudioNirin, please review the below. I am going to make a new branch to work on this but I want to ensure it aligns with your thoughts. Proposed: Smart Cache Eviction SystemThe ProblemCurrently, when the cache fills up, PlexCache-R simply skips new files (first-come-first-served). Files only move back to the array when they're no longer on OnDeck/Watchlist. This means:
Proposed Solution: Priority-Based EvictionAssign each cached file a priority score (0-100). When cache approaches capacity, automatically evict the lowest-scoring items first to make room for higher-priority content. Priority Scoring Factors
Example Scores
New Settings{
"cache_eviction_mode": "smart", // "smart", "fifo", or "none"
"cache_eviction_threshold_percent": 90, // Start evicting at 90% full
"eviction_min_priority": 60 // Only evict items below this score
}Key Design Decisions
Prerequisite: OnDeck User TrackingCurrently, we track which users have items on their Watchlist but not OnDeck. To enable the "User Count" factor for OnDeck items, we need to:
This is a refactor of existing code, not a new API integration. DiagnosticsNew Questions for Discussion
Looking for any feedback before I start implementation |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Features/Proposals:
Making it so that files don't actually get moved off the Array, but instead just get renamed and copied to cache. Reduces write operations. (Main discussion thread for this here) (Worked on by @Brandon-Haney )
Make it so that the Exclude file has a marker, so that a user can manually add in entries above that marker that are never altered (or read) by plexcache. I believe Mover Tuner only allows for a single Exclude file, so this will allow this file to function in that way for users that need it. (Worked on by @StudioNirin )
Figure out a way to have the exclude file also have files that are newly marked as 'needed on cache', but were already on cache (new downloads etc) and not being moved from the array. The issue comes in with the current option of "watched files get moved back to array" as you might want those files to stay on cache (if they're recent downloads) so other users can watch them.
(Already part of 1 above).
Possibly implementing a proper auth token specific to the script. Thoughts on the below approach?
Addition to the new in v2.0 'data storage limit' feature, where if it detects plexcache is using that much space, it prioritises removing watchlist items in favour of onDeck items or something.
Remove Watchlist_Cache file completely.... is there actually any use for it? Whenever I run the script I want it to be accurate and up to date. I have mine set to 6 hours, and the script runs once or twice a day, so it's always 'expired' anyway. Why bother keeping it? Does anyone have a use for this existing?
Remove 'Watched_Cache' file completely. Again, I'm not sure it has any real use. Even less so than the watchlist cache file. The watchlist is at least useful, it just probably doesn't need to be stored for future runs. The watched file seems to have no benefit.
Bugfixes:
All reactions