-
Notifications
You must be signed in to change notification settings - Fork 117
/
abstract_usercache_handler.py
39 lines (35 loc) · 1.32 KB
/
abstract_usercache_handler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
from builtins import object
import logging
class UserCacheHandler(object):
@staticmethod
def getUserCacheHandler(uuid):
"""
Returns the current usercache handler configured in the config file,
or the builtin cache if nothing is configured
"""
# We put the import statement in here to avoid circular dependencies
# It is also not needed anywhere else since this is a completely static
# function otherwise
import emission.net.usercache.builtin_usercache_handler as biuc
return biuc.BuiltinUserCacheHandler(uuid)
def __init__(self, user_id):
self.user_id = user_id
def moveToLongTerm(self):
"""
Moves all messages that have arrived for the current user into long-term
storage, after converting into a platform-independent format.
"""
pass
def storeViewsToCache(self):
"""
Moves all messages that have arrived for the current user into long-term
storage, after converting into a platform-independent format.
"""
pass