Skip to content

Commit 4db17b1

Browse files
author
Mangaru
committed
Apply Creational Design Pattern
1 parent 1c7e4ae commit 4db17b1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/caches.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
class caches:
2+
_instance = None
3+
@staticmethod
4+
def get_instance():
5+
if caches.__instance == None:
6+
caches
7+
return __instance
8+
19
"""app.caches.py"""
210
import functools
311
import logging

0 commit comments

Comments
 (0)