osclib/cycles: only cache target project builddepinfo to avoid excessive cache.
Keep on disk using caching mechanism to avoid keep entire graphs in memory and expiring via existing code.
This commit is contained in:
parent
57d9d2986b
commit
b2861ae31a
@ -66,10 +66,13 @@ class Cache(object):
|
||||
|
||||
CACHE_DIR = os.path.expanduser('~/.cache/osc-plugin-factory')
|
||||
TTL_LONG = 12 * 60 * 60
|
||||
TTL_MEDIUM = 30 * 60
|
||||
TTL_SHORT = 5 * 60
|
||||
TTL_DUPLICATE = 3
|
||||
PATTERNS = {
|
||||
'/build/[^/]+/_result': TTL_DUPLICATE,
|
||||
# For cycles when run via repo-checker cache non-stagings.
|
||||
'/build/(?:[^/](?!:Staging:))+/[^/]+/[^/]+/_builddepinfo$': TTL_MEDIUM,
|
||||
# Group members cannot be guaranteed, but change rarely.
|
||||
'/group/[^/?]+$': TTL_SHORT,
|
||||
# Clear target project cache upon request acceptance.
|
||||
|
@ -150,7 +150,6 @@ class CycleDetector(object):
|
||||
# Store packages prevoiusly ignored. Don't pollute the screen.
|
||||
self._ignore_packages = set()
|
||||
|
||||
@memoize(ttl=60*60*6)
|
||||
def _builddepinfo(self, project, repository, arch):
|
||||
root = None
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user