mirror of
https://github.com/SynologyOpenSource/pkgscripts-ng.git
synced 2025-08-01 16:48:10 +00:00
Synology DSM6.0.2 toolkit framework
1. pythonize EnvDeploy and PkgCreate.py 2. EnvDeploy change sourceforge directory
This commit is contained in:
11
include/python/cache.py
Normal file
11
include/python/cache.py
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
class cache(dict):
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
|
||||
def __call__(self, *args):
|
||||
return self[args]
|
||||
|
||||
def __missing__(self, key):
|
||||
result = self[key] = self.func(*key)
|
||||
return result
|
Reference in New Issue
Block a user