mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 11:49:24 +02:00
Added task to delete unused cached files
This commit is contained in:
parent
6a04779125
commit
c20e4d7c9a
4 changed files with 73 additions and 0 deletions
|
@ -4,3 +4,17 @@ from dynamic_preferences import types
|
|||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
federation = types.Section('federation')
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class MusicCacheDuration(types.IntPreference):
|
||||
show_in_api = True
|
||||
section = federation
|
||||
name = 'music_cache_duration'
|
||||
default = 60 * 24 * 2
|
||||
verbose_name = 'Music cache duration'
|
||||
help_text = (
|
||||
'How much minutes do you want to keep a copy of federated tracks'
|
||||
'locally? Federated files that were not listened in this interval '
|
||||
'will be erased and refetched from the remote on the next listening.'
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue