Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/storage/archive.py
from ..archive import ArchiveInterface | from typing import List | ||||
# from functools import lru_cache | # from functools import lru_cache | ||||
from methodtools import lru_cache | from methodtools import lru_cache | ||||
from typing import List | |||||
from swh.storage import get_storage | from swh.storage import get_storage | ||||
from ..archive import ArchiveInterface | |||||
class ArchiveStorage(ArchiveInterface): | class ArchiveStorage(ArchiveInterface): | ||||
def __init__(self, cls: str, **kwargs): | def __init__(self, cls: str, **kwargs): | ||||
self.storage = get_storage(cls, **kwargs) | self.storage = get_storage(cls, **kwargs) | ||||
@lru_cache(maxsize=1000000) | @lru_cache(maxsize=1000000) | ||||
def directory_ls(self, id: bytes): | def directory_ls(self, id: bytes): | ||||
# TODO: filter unused fields | # TODO: filter unused fields | ||||
Show All 32 Lines |