caching

SCons: How to put multiple output files in cache

Hi all, Our compiler produces a debug file in addition to the object file. This debug file is needed for the final debugging target. I already added this file as additional dependency for the target. But when using a CacheDir() this file should be stored together with the object file. I already tried to add the debug file as a SideEffe...

ASP.NET & Entity Framework 4.0 data not refreshing on screen

I've written a 2-tier C# asp.net application. Everything works OK, but if I modify the SQL Server data using the management console, the changes are not displayed on screen. It seems the application reads the data from a cached instance. I have tried everything to make sure it's not a browser cache issue... the data remains static until ...

Thread-safe cache of one object in java

Hello guys, let's say we have a CountryList object in our application that should return the list of countries. The loading of countries is a heavy operation, so the list should be cached. Additional requirements: CountryList should be thread-safe CountryList should load lazy (only on demand) CountryList should support the invalidat...

css and js caching problem: How do I update the cache only when I want?

I am trying to cache the css and js files for my mvc project, and I found a solution to the problem I would like to implement. StackOverflow uses parameters in its header links to only refresh the files in the cache when they change their resource number. For those who are unfamiliar, the question I found this solution in is here: htt...

jquery ui tabs caching conundrum

I am working on a web-app for my employer and I am using some jquery. I am fairly good at PHP, but lost in jquery. My question is as follows: I have a a working tabs page that loads a monster PHP page when it first loads. I need to make sure that this particular tab only loads when the page is called (the first time only). I have th...

[ASP.NET MVC] Cache CSS and JS files

Hi all, When I refresh my website in less than 2-3 minutes, Firebug shows these nice requests: 1. /core.css 304 Not modified 2. /core.js 304 Not modified 3. /background.jpg 304 Not modified BUT when I refresh after >3 minutes, I get: 1. /core.css 200 OK 2. /core.js 200 OK 3. /background.jpg ...

When overFlowToDisk gets activated in EHCACHE?

I have some questions on "overflowToDisk" attribute of element? 1) I read at this URL that : overflowToDisk sets whether element can overflow to disk when the memory store has reached the maximum limit. "Memory" above refers JVM memory allocated for Java process running EHCACHE, or is there any parameter in to specify Cache memory ...

Reload the page on hitting back button

I have a webpage that requires login. Once a user has logged in I start the session and once he logs out I destroy it, but when I press the back page it gives me the user profile page again which ideally should not be the case as the user has logged out. However, it works fine if I reload the page after logging out. It's a local chatroo...

PHP performance: accelerators and HTTP servers

First, which is the fastest accelerator: XCache or APC? And should I have nginx, lighttpd, Apache or Apache with nginx as a reverse proxy for static contents. What's better? Thank you. ...

When to go for Caching/Second level cache? Any practical scenario with specifics?

I'm working on a web based application that belongs to an automobil manufacturer, developed in Spring-Hibernate with MS SQL Server 2005 database. Through this application, end users can request for creating a Car, Bus, Truck etc through web based interfaces. When a user logs in, a HTML form gets displayed for capturing technical specif...

Files that apache Gzips, is it cached or not? or it just wastes CPU every time a request is made?

Title says it all.. ...

Can someone explain to me why its impossible to invalidate cache in jquery?

I make an ajax call to retrieve a list and cache is set to true. Later, I insert a new item, and retrieve the list again, but this time I set cache to false. Jquery properly shows me the correct list. It is at this point when I would expect jquery to start caching this updated list with the newly inserted data. However, when I make anoth...

How to cache results in scala?

This page has a description of Map's getOrElseUpdate usage method: object WithCache{ val cacheFun1 = collection.mutable.Map[Int, Int]() def fun1(i:Int) = i*i def catchedFun1(i:Int) = cacheFun1.getOrElseUpdate(i, fun1(i)) } So you can use catchedFun1 which will check if cacheFun1 contains key and return value associated with it. ...

Is it appropriate to use Microsoft.Practices.EnterpriseLibrary.Caching with ASP.NET?

Working on a legacy ASP.NET application we've found that ASP.NET session gets used for caching some objects, but for some objects Microsoft.Practices.EnterpriseLibrary.Caching gets used. Is there any reason to use Microsoft.Practices.EnterpriseLibrary.Caching over standard ASP.NET Session? Edit In my scenario, the Enterprise Library c...

Caching URLs without Ad content

We want to cache the URLs typed in/visited by the user and we are trying to do this by logging all the http GET requests. We realized that there will be multiple GET requests from the same page (both for page content and ads). However, we want to cache only the primary GET. One idea is to cluster the GET requests in time and use the firs...

PHP - Twitter API, Creating and Using Cache File

Why would the following code request an RSS feed from the corresponding Twitter account more than 4 times per hour (because that's what Twitter says it's doing)? In handling this data, I'm using php's simpleXML and referencing $local_file_twitter. The handling script makes no direct requests to the Twitter feed itself. the Cache folder h...

iphone: Caching an NSMutableArray?

I'm currently writing a Twitter client for iPhone and need a way to cache the public timeline. The data fetched is stored as 'Status' objects in an NSMutableArray. The NSMutableArray stores 20 objects at a time. What is the best way to do this? ...

Caching Strategy for ASP.NET MVC / GeneratedImage

Hi guys, I'm currently developing an image viewer using asp.net MVC. The image viewer itself works as a charme, but I'm not happy with the caching. To explain: I'm using the GeneratedImage (http://aspnet.codeplex.com/releases/view/16449) in order to produce the thumbs, but the Server Side Caching is only limited to 5 Minutes and can't ...

Set Caching Headers in Apache

Hi All, I want to set some headers in Apache 6.0.16 such as (caching headers max-stale, min_fresh no_store...) ....any suggestions helps are most welcomed. ... Thanks :) ...

Do I need external 2nd level cache for multiple NHibernate instances in Windows Azure?

I am developing AMF Flash gateway on FlourineFx application for deployment on Windows Azure and I want to use Azure SQL. I use NHibernate 2.1 + NHibernate.Linq 1.0 + FluentNHibernate 1.1 There will be two or more instances of this FlourineFx gateway and only 1 database. I am planning on implementing memcached as 2nd level cache later ...