def _get_calendar(self, freq, future):
    'Load calendar using memcache.\n\n        Parameters\n        ----------\n        freq : str\n            frequency of read calendar file\n        future : bool\n            whether including future trading day\n\n        Returns\n        -------\n        list\n            list of timestamps\n        dict\n            dict composed by timestamp as key and index as value for fast search\n        '
    flag = f'{freq}_future_{future}'
    if (flag in H['c']):
        (_calendar, _calendar_index) = H['c'][flag]
    else:
        _calendar = np.array(self._load_calendar(freq, future))
        _calendar_index = {x: i for (i, x) in enumerate(_calendar)}
        H['c'][flag] = (_calendar, _calendar_index)
    return (_calendar, _calendar_index)
Load calendar using memcache.

Parameters
----------
freq : str
    frequency of read calendar file
future : bool
    whether including future trading day

Returns
-------
list
    list of timestamps
dict
    dict composed by timestamp as key and index as value for fast search
def _get_calendar(self, freq, future):
    'Load calendar using memcache.\n\n        Parameters\n        ----------\n        freq : str\n            frequency of read calendar file\n        future : bool\n            whether including future trading day\n\n        Returns\n        -------\n        list\n            list of timestamps\n        dict\n            dict composed by timestamp as key and index as value for fast search\n        '
    flag = f'{freq}_future_{future}'
    if (flag in H['c']):
        (_calendar, _calendar_index) = H['c'][flag]
    else:
        _calendar = np.array(self._load_calendar(freq, future))
        _calendar_index = {x: i for (i, x) in enumerate(_calendar)}
        H['c'][flag] = (_calendar, _calendar_index)
    return (_calendar, _calendar_index)