# Path: findatapy/util/singleton.py
# class Singleton(type):
#     _instances = {}
# 
#     def __call__(cls, *args, **kwargs):
#         if cls not in cls._instances.keys():
#             cls._instances[cls] = super(Singleton, cls).__call__(*args,
#                                                                  **kwargs)
#         return cls._instances[cls]


from findatapy.util.singleton import Singleton
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on a "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
#



class CacheManager(object):
    __metaclass__ = Singleton

    _is_init = 0

    _dict_cache = {}

    def __init__(self, *args, **kwargs):
        if CacheManager._is_init == 0:
            # CacheManager.populate_time_series_dictionaries()
            CacheManager._is_init = 1
        pass

    ### time series ticker manipulators
    @staticmethod
    def add_cache(key, obj):
        CacheManager._dict_cache[key] = obj

    @staticmethod
    def get_cache(key):

# Path: findatapy/util/singleton.py
# class Singleton(type):
#     _instances = {}
# 
#     def __call__(cls, *args, **kwargs):
#         if cls not in cls._instances.keys():
#             cls._instances[cls] = super(Singleton, cls).__call__(*args,
#                                                                  **kwargs)
#         return cls._instances[cls]


# Path: findatapy/util/cachemanager.py
from findatapy.util.singleton import Singleton

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on a "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
#



class CacheManager(object):
    __metaclass__ = Singleton

    _is_init = 0

    _dict_cache = {}

    def __init__(self, *args, **kwargs):
        if CacheManager._is_init == 0:
            # CacheManager.populate_time_series_dictionaries()
            CacheManager._is_init = 1
        pass

    ### time series ticker manipulators
    @staticmethod
    def add_cache(key, obj):
        CacheManager._dict_cache[key] = obj

    @staticmethod
    def get_cache(key):

        if key in CacheManager._dict_cache: