caching

HttpContext.Cache Expiration

Is there a way to specify how long data is held in HttpContext.Cache? ...

Forcing non-cached gethostbyname()

Hi. Is there any way to prevent the gethostbyname() function not to read the nscd cache on Linux? Thanks in advance! ...

Best way to disable client caching

I'm using a simple servlet filter that forces the browser to skip caching for some server resources: Cache-Control: private Pragma: This works fine in Internet Explorer but it doesn't works well with Firefox 3.0.10. I ended to write this code: Cache-Control: no-cache, no-store, must-revalidate, max-age=-1 Pragma: ...

Silverlight Cache Control: Using revision number in url for XAP causes HyperLink to crash SL App!

Hi there, To make sure all our customers receive the latest Silverlight App, we are placing the new revision number on the url for XAP file as follows: <param name="source" value="/ClientBin/ShoeboxViewer.xap?v=5" /> Problem is when we do this, all HyperLink controls (in the Silverlight App) that use relative URLs, throw an internal ...

NHibernate cache expiration

I use custom developed ORM currently and am planing to move to nhibernate. Currently, I use both L1 - session level caching and L2 - Application level caching. Whenever an object is requested from L2 cache by L1 cache, it checks database for modified since last load, and loads only if it has been modified. Can I do this with NHibernat...

How to clear/expire browser cache on log off?

In my ASP.net MVC application, I've got several views that I'd like to set to save in the browser's cache. I've got the methods built to do it, but here's my issue. The menu in my site is different between logged in and logged off visitors. If the logged in page is cached, then even when the user logs off the menu remains in the logged ...

Update results of NSFetchedResultsController without a new fetch

I'm working on an application that holds its data in an external MySQL server, but caches it locally using Core Data for better response times. Basically, what I'd like to do is this: Fetch data from Core Data (SQLite data store, using NSFetchedResultsController) and display it Grab new items from the MySQL server in the background Ref...

Is implementing a cache considered a difficult problem?

There are many questions on here about caching that doesn't work properly, or asking how to implement caches properly, for all sorts of things from HTTP to SQL queries, L1/L2 memory caching, etc.. Is it generally held to be a difficult problem in computer science terms? ...

mod_python caching of variables

I'm using mod_python to run Trac in Apache. I'm developing a plugin and am not sure how global variables are stored/cached. I am new to python and have googled the subject and found that mod_python caches python modules (I think). However, I would expect that cache to be reset when the web service is restarted, but it doesn't appear to ...

LRU cache implementation in Javascript

Java has LinkedHashMap which gets you 99% there to an LRU cache. Is there a Javascript implementation of an LRU cache, preferably from a reputable source, that is: understandable efficient (amortized O(1) get/put/delete) ? I've been searching on the web but couldn't find one; I thought I found one on Ajax Design Patterns but it glos...

Fastest way to loop through a 2d array?

Hey folks, I just stumbled upon this blog post. The author shows two code samples that loop through a rectangle and compute something (my guess is the computing code is just a placeholder). On one of the example, he scans the rectangle vertically, and on the other horizontally. He then says the second is fastest, and every programmer sh...

Visual Studio 2008 App.config Caching

For the last couple months i have ben having some issues with my app.config. I will add an AppSetting key and run my project with no real issue it reads the config file and all is good. Then at a later date i will change the value of that same key and when i run my project I will get the old value of the key. It seems like it isnt savi...

Is IIS Web-Garden Forced Process Initialization possible?

We have an ASP.Net Web Application that is running in an IIS Web-Garden--which is configured to allocate up to four processes. In our Web Application the first user that hits the site causes the loading of all of the cached items. Since we are running in a IIS Web-Garden it ultimately takes up to four first time users to build up the cac...

if-modified-since vs if-none-match

Hi, What could be the difference between if-modified-since and if-none-match? I have a feeling that if-none-match is used for files whereas if-modified-since is used for pages? ...

How are persistent database connections stored in PHP?

As stated in the documentation on sqlite_popen php tries to make use of a persistent resource mechanism. Where is this mechanism described in detail? Is it possible to view all resources currently stored/used? Is it possible to access this mechanism and store/read other values? ...

Is there an option to configure a priority in memcached? (Similiar to Expiry)

A hashtable in memcached will be discarded either when it's Expired or when there's not enough memory and it's choosen to die based on the Least Recently Used algorithm. Can we put a Priority to hint or influence the LRU algorithm? I want to use memcached to store Web Sessions so i can use the cheap round-robin. I need to give Session...

Invalidate OS disk read cache

I'm trying compare the performance of a windows program when the disk cache is in its best state (when all files needed for the program to run are in memory cache, I just run it multiple times to get this state), and when the cache is in its worst state, that is completely empty. The only way way I know to ensure that the cache is compl...

C++, ways to benchmark improvements in cache locality?

I have an implementation of a class X, that has two pointers to two pieces of information. I have written a new implementation, class Y, that has only one pointer to a struct that contains the two pieces of information together as adjacent members. X's and Y's methods usually only need to manipulate one of the pieces of information, but ...

Theory of caching

Is there a unified theory of caching? That is, collections of theorems and algorithms for constructing caches and/or optimizing for them? The question is deliberately broad, because the results I am looking for are also broad. Formulas for maximum achievable speedup, metrics for caching algorithms, stuff like that. A university-level te...

what is asp's application object java equivalent?

in asp there's an Application object, which is like the Session but it's shared among all sessions... http://msdn.microsoft.com/en-us/library/ms525360.aspx You can use the Application object to share information among all users of a given application. An ASP-based application is defined as all the .asp files in a virtual directory a...