In [1]:
import pymaid
rm = pymaid.CatmaidInstance('server_url', 'api_token', 'http_user', 'http_password')
In [2]:
%time n = pymaid.get_neuron(16)
In [3]:
%time n2 = pymaid.get_neuron(16)
In [4]:
rm.setup_cache(size_limit=128, time_limit=900)
In [5]:
rm.cache_size
Out[5]:
In [6]:
rm.clear_cache()
rm.cache_size
Out[6]:
In [7]:
rm = pymaid.CatmaidInstance('server_url', 'api_token', 'http_user', 'http_password', caching=False)
In [8]:
rm.caching = False
In [9]:
n = pymaid.get_neuron(16)
rm.save_cache('cache.pickle')
rm.clear_cache()
rm.load_cache('cache.pickle')
n = pymaid.get_neuron(16)