Skip to content

Commit de93e21

Browse files
committed
caching storage manager
1 parent d5f0ed3 commit de93e21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/storage_manager.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
import os
55
from dataclasses import dataclass
6+
from functools import cache
67

78
import boto3
89
from botocore.exceptions import ClientError
@@ -106,5 +107,6 @@ def get_image(self, uuid: list[str]) -> Image:
106107
raise
107108

108109

110+
@cache
109111
def get_storage_manager() -> S3StorageManager:
110112
return S3StorageManager()

0 commit comments

Comments
 (0)