0
votes
1answer
22 views

Django: how can I automatically generate and cache my urls.py?

My project's URLs are automatically generated in urls.py using a for loop (the URLs look like AppName/ViewName). According to the docs, urls.py is loaded upon every request. This appears to be slowing ...
-1
votes
0answers
12 views

django local cache corrupts objects making them unusable

I'm working with google APIs and I'm caching the service object, which is an authenticated object for API access. Unfortunately, after having been cached, it doesn't work anymore, returning a login ...
1
vote
0answers
23 views

LRU cache on hard drive python

I want to be able to decorate a function as you would do with functools.lru_cache, however, I want the results to be cached on the hard drive and not in memory. Looking around, I get a feeling this is ...
0
votes
5answers
62 views

Function which computes once, caches the result, and returns from cache infinitely (Python)

I have a function which performs an expensive operation and is called often; but, the operation only needs to be performed once - its result could be cached. I tried making an infinite generator but ...
0
votes
1answer
43 views

Determine whether code being run is in DRAM or SRAM

Is there any way to determine where my code is being run? I see a lot of utility in being able to optimize my code for running in my cache, but I'm not sure how possible it is to dig down to that ...
0
votes
1answer
26 views

Python - Mako templates - How to invalidate cache?

One of my pages has a block generated with this key: <%block cached="True" cache_key="${(month, year, timezone, admin)}"> To invalidate a specific month/year, I loop through all the ...
0
votes
1answer
25 views

how to increase berkeley db cache size

I am trying to set the cachesize in giga bytes for a bdb file. I am using the python interface for bdb. I see the underlying 'C' api for bdb has this option. int DB->set_cachesize(DB *db, ...
0
votes
1answer
25 views

Storing repeated Complex Calculations and serving through tastypie api

I have a Django app which uses tastypie for apis.A python module does complex financial calculations when i hit the url and fetches only the required data for particular user.For the calcualtions some ...
0
votes
2answers
37 views

Cache updated every hour-where to store it?

I have a python script that generates data(every hour), to be later read by a PHP web page. Where should I store the data - in a database, in a file, or somewhere else? There will be something close ...
1
vote
1answer
42 views

Caching in python by change of members

I have a class with some members, and some methods that access those members. I want to cache the methods, but every time one of the members change they shouldn't access the cache but run again ...
0
votes
1answer
48 views

best way to cache dynamic tastypie resource? memche,redis,joblib or any other in memory

I am currently working a django/tastypie web app.I have a dynamic resource, which is based on one of my python module, which will return data like this { 'company_code_1': {'indicator1': 1000, ...
0
votes
0answers
34 views

Browser caching for captive portal

I'm having a problem with a custom captive portal implemented with iptables and some python authentication scripts. When a user makes an initial connection to the network and attempts to access a ...
1
vote
2answers
37 views

Memoize a function which uses instance attributes

I'm new to python and i couldn't find an answer online. lets say i have a method which does some computation and returns a string def output(self) a=self.some_long computation1() ...
1
vote
1answer
57 views

Scrapy http cache storage in memcached

I'm using scrapy framework for crawling and I wonder if there is a way to use memcached as storage backend for http cache (HTTPCACHE_STORAGE option). The storages, which are available from the box, ...
0
votes
2answers
45 views

De-uglify memcache boilerplate in Python

I'm just getting started with Python. I'm making heavy use of caching in my app and my code is increasingly littered with this same pattern, which is the standard caching pattern I've seen used all ...

1 2 3 4 5 19
15 30 50 per page