caching

Alternative to HttpContext.Current.Cache

What's an alternative to HttpContext.Current.Cache ? I'm dealing with only the application tier and not the web tier so what is best for this? We obviously don't want to use this because unit tests in the app tier will not have an HttpContext. Would a simple list or dictionary object work? ...

How to instruct browsers to ignore GET parameters when caching a resource

Is there a way (an http header) to tell browsers not to distinguish between main.css and main.css?someparam=1 when performing caching. According to w3c spec: since some applications have traditionally used GETs and HEADs with query URLs (those containing a "?" in the rel_path part) to perform operations with significant side effects,...

Find Users based on Twitter Friends

I have an app where I pull in tweets with a certain hash tag. When I find the hash tag the app automatically creates a user if they don't exist. When the user logs in via Twitter, I want be able to present them with their friends which are also using the app. The problem is for Twitter users with a ton of friends there is a max response ...

Creating an efficient way of keep track of many 100's of 1000's of tagged cache id references

We currently have a table setup to keep track of cache file names or memcached key references. The table exists so that when a comment is added or more content is added the system automatically purges those cache files/key-value pairs that are affected by the update so the rebuild the next time a user accesses the page the user sees the ...

Whats the best way to manage keys (in memcache ) to prevent stale cached values?

Ive recently implemented memcache on my site which has been under heavy mysql load (mysql was as optimized as I could make it). It solved all my load issues, and site is running beautifully. The problem that Im facing now is stale cached values. I have 1hr auto expiration times on most pages, and Im also deleting the key when the value...

What advantages are there to programming for a non-cache-coherent multi-core machine?

What advantages are there to programming for a non-cache-coherent multi-core machine? Cache_coherence has many benefits, but how would one take advantage of the opposite of this feature - an independent cache for each individual core. What programming paradigm and to what particular practical problems would such an architecture be benefi...

C# / .NET : Caching forms or speeding up form generation

I have a zoomable form-interface like MS Word. The form contains +70 controls (Richtextbox, checkbox, etc) that are positioned all over the form. The problem is that generating the form takes 2.5 seconds. Adding the 70 controls with panel.Controls.Add( ctrl) alone takes 1 second. (16 ms per call). Is there a way to cache the whole blan...

Are there Adaptive Replacement Cache patent-free alternatives?

An open source high-performance project I'm working on needs to keep a cache of parsed/compiled files. A plain LRU or a plain LFU wouldn't fit. Plain LRU wouldn't work as there will be remote batch/spider processes hitting the service regularly. Plain LFU wouldn't work because content will age. ARC seems like the perfect solution but sin...

7 Point computational stencil cache access problem in C (or..map a 3D array into a 1D array)

Hi all, I have a problem I am trying to tackle that involves a 7 point computational stencil. For those who may not know, this would be a 3D grid, and the 7 points are the n'th point, and the neighbors one point away in the x, y and z directions, both positive and negative (or neighbors to the east/west/north/south and up/down). So thes...

Rails how to expire a directory?

How to expire a directory in Rails? I have a blog where /posts/ lists all the posts. Controller posts, action index. Pretty standard stuff. Posts are paginated in groups of 10 using will_paginate. The pages are being cached like this: /posts/ /posts/index/2 /posts/index/3 /posts/index/4 ... /posts/index/134 /posts/index/135 ... e...

PHP PDO Caching

Hi there, I've been looking for an answer to this but haven't found it anywhere. Are calls to PDO::prepare() cached, or should I cache the result myself, i.e. if I do the following function foo () { $handle = PDO::prepare(...); /* do stuff with the handle */ } will the prepare() statement be cached by PDO so that it's quickly re...

How to disable Django query cache ?

In my Django application, I repeatedly run the same query on my database (e.g. every 10 seconds). I then create an MD5 sum over the queryset I receive and compare that to the MD5 sum I created in the previous run. If both are equal, the data has not changed and the web page does not need updating. While I do this, the data in the DB mig...

How do I precache files on a perfoce proxy server in order to obtain some decent speed?

Perforce proxy does cache files only when a user does sync them so if you are the single user of a perforce proxy that is syncing some locations you will gain almost nothing from it. The question is how to make perforce cache the files for you? ...

IIS7, including .html in asxp, prevent caching

We currently are running windows 2008 Server Standard Edition. We are running a .net site and on some of the pages we are using includes to include some .html files that are used with our javascript. We are having an issue though with caching. When we edit one of those .html files, we can navigate to it by typing in the URL directly and ...

Does a worker process share its output cache within an AppPool?

Summary: I have an ASP.NET MVC website in IIS named 'Website' using an AppPool named 'WebsiteAppPool'. WebsiteAppPool is configured to allow up to 4 Worker Processes, in effect creating a 'Web Garden'. The Website is also configured, via web.config, to enable OutputCaching using CacheProfiles. <caching> <outputCacheSettings> <out...

Python app engine import issues after app is cached

I'm using a modified version on juno (http://github.com/breily/juno/) in appengine. The problem I'm having is I have code like this: import juno import pprint @get('/') def home(web): pprint.pprint("test") def main(): run() if __name__ == '__main__': main() The first time I start the app up in the dev environment it works fin...

How to cache user's profile info (update when profile changed)?

I have a UserInfo object that is generated on each page_prerender event. This object is generated from the db and contains general info and permissions info. Since this object is always the same for each user - unless the user updates his profile - I'd like to cache it. Does anyone know how I would do so per user (as each user of the w...

how can I cache the images coming from other website.

I there a way that i can cache the images coming from other websites? I want to have a local copy of the images using cache in PHP so that the site will load faster. ...

One database, two applications, 2nd-level caching and NHibernate

What do I need to know when setting up caching using NHibernate, in the case that I have two applications running on different servers, but only one database. Are table dependencies generally sufficient to make sure that weird caching problems don't arise? If so, what sort of polltime should I look at? ...

Cachesecond in Spring module

I am currently new to web programming and is trying out to learn spring framework. I have basic understanding on Servlets and JSP. Currently, I am confused on the property cacheSecond on the Spring Controller. Can anybody point me to resource where I could understand below concepts? I made some reading on browser caching but I am not...