from cachetools import cached, LRUCache, TTLCache


@cached(cache=TTLCache(maxsize=1024, ttl=300))
def get_targets(es, cogen_name='lutosa'):
    obj_param = es.get(index="cogen_parameters", id=cogen_name, doc_type="doc")
    return obj_param['_source']['targets']
1d4c0f36441697a278fa04c4a5ffe3951089c332
<mask token>

<mask token>


@cached(cache=TTLCache(maxsize=1024, ttl=300))
def get_targets(es, cogen_name='lutosa'):
    obj_param = es.get(index='cogen_parameters', id=cogen_name, doc_type='doc')
    return obj_param['_source']['targets']

from cachetools import cached, LRUCache, TTLCache


@cached(cache=TTLCache(maxsize=1024, ttl=300))
def get_targets(es, cogen_name='lutosa'):
    obj_param = es.get(index='cogen_parameters', id=cogen_name, doc_type='doc')
    return obj_param['_source']['targets']

from cachetools import cached, LRUCache, TTLCache


@cached(cache=TTLCache(maxsize=1024, ttl=300))
def get_targets(es, cogen_name='lutosa'):
    obj_param = es.get(index="cogen_parameters", id=cogen_name, doc_type="doc")
    return obj_param['_source']['targets']