caching

Preventing the browser caching a linked file

I've been tasked to maintain a PHP website with a function which automatically generates RTF files and provides a link to download. Each time the previously generated file is overwritten by the new one. However, it seems that upon attempting to download the generated file, the browser will sometimes retrieve a cached version which is no...

How to deal with expiring item (due to TTL) in memcached on high-load website?

When you have peaks of 600 requests/second, then the memcache flushing an item due to the TTL expiring has some pretty negative effects. At almost the same time, 200 threads/processes find the cache empty and fire of a DB request to fill it up again What is the best practice to deal with these situations? p.s. what is the term for this...

nginx + phusion passenger + ree not returning 304 for html

I'm using nginx + passenger + ree to host my web app in a linode vps. The config i'm using is the following: user ***; worker_processes 4; events { worker_connections 1024; } http { passenger_root /opt/passenger-2.2.15; passenger_ruby /opt/ruby-enterprise-1.8.7-2010.02/bin/my_ruby.sh; passenger_max_pool_size 10; ...

Cache XML File Java

Hi Guys, I am trying to Cache a XML File on application initialization. What would be the best approach to do it? Which would be the most efficent datastructure which I can use? The datastructure should be efficent in lookups. Thanks! ...

page cache in rails

My home page is largely the same for all users, which makes it a candidate for page caching. however, there are a couple of things that are user specific. For example, there is a nav item that is only shown for logged in users and there is a link like logout, my profile etc, generated for specific users. Do I have to use fragment cachi...

Coherence cache | ConcurrentHashMap in, HashMap out

I just started working with Oracle's Coherence cache and I noticed this: If I put in a ConcurrentHashMap object in the cache, when I retreive it, I could see that it is converted to a normal HashMap. Anything I can do to avoid this internal conversion? ...

java.lang.RuntimeException: ERROR: Failed to recover corrupt cache entry

I just had this error message from one of my users. (IE8, Java 1.6.20 ). It is from an applet which receives instructions from Javascript and executes certain processes on the client. RangeError java.lang.RuntimeException: ERROR: Failed to recover corrupt cache entry at com.sun.deploy.cache.CacheEntry.recover at com.sun.deploy.cache.Cac...

Image caching strategy

The Scenario I am building a web application where reports can be generated on the fly (based on information retrieved from an SQL database). These reports will contain charts, which can also be generated on the fly. Because these charts contain sensitive information, using a 3rd party chart API (ie: Google Charts) is out of the questi...

Manually enqueue reusable UITableViewCells?

I have some custom table view cells that takes a while to draw, so the first time you scroll it's not very smooth. After the first scroll, all the views are cached and the scrolling is very smooth. So what I'm wondering is if I could draw all the cells and cache them before the table view is shown and how I would do that. Would there be...

T-SQL Emitted by the aspnet_regsql.exe when working wih Sql Cache Dependency

Hi All, Recently our application went for Load Testing and in the profiler trace of out DB we found out that the T-SQL emitted by the aspnet_regsql command ran for more than 341 times, whereas it must only for the creation of the Notification table and the SPs it uses for reading and writing values into this table. Does anyone have any ...

Umbraco caching

I'm having real problem with caching in a macro. I've set the cache period to 0 but still a dropdownlist that returns a list of other items in the content tree won't update until I force the application to recycle e.g. touch the web.config file. The Macro uses umbraco.content.Instance.XmlContent.SelectSingleNode to select a parent node ...

function call 'clear_all_cache' and 'clear_assign' is unknown or deprecated. error in smarty?

I need to remove the cache when a user change language, but I get an error message. $smarty = new Smarty; //$smarty->force_compile = true; $smarty->debugging = true; $smarty->caching = false; $smarty->cache_lifetime = 120; if (isset($_COOKIE['country'])) { $country = $_COOKIE['country']; $language = "eng"; if ($country ...

Different version of the cache in Symfony

I'm new in Symfony and I have a problem with logical code organisation. The problem is connected with cache and different version of webpage for guests, logged in users and owner. For example. I have 'user' module, which has 'show' action, and the URL is /user/show/:id and URL is the same for every visitor. But the content of the page ...

How can I ensure a dynamically-generated javascript file is never cached?

I have a dynamically-generated javascript file that I want to ensure is NEVER cached by the browser. My current method is to simply append a (new) guid to the url in the script tag on each page view. For example: <script type="text/javascript" src="/js/dynamic.js?rand=979F861A-C487-4AA8-8BD6-84E7988BD460"></script> My question is...i...

Force latest version Silverlight app to be loaded in browser each time.

I notice that Firefox will not always load the latest version of a Silverlight app. I believe I can get my app to always be loaded by setting an 'expiration' in a cookie or something .. Where do I do this? (I have found that Firefox will work away happily for hours loading a new app each time and then the next time I try and load it wil...

Android Is there a way to redirect the build in android cache?

So i want to redirect the build-in android cache management outside data/com.app/cache dir. I want to put the cache dir to the sdcard. If this is not possible is there a way to set a fixed size for cache?Thank you ...

Permanently-Caching images in GWT

Dear members, What's difference between cache & permanently cache in browser. In GWT framework image files rename to .cache. pattern and I read somewhere in google website to cache permanently images in GWT configure the App-Server for caching them permanently. But I don't know how to do this exactly. My website's images will never chan...

Why might Maven ignore updated classes during install?

I've been seeing odd behaviour from my Maven 2.2.1 installation whilst doing war installs. Occasionally, I will update a class but the updated version is not packaged up in the artifact produced by mvn install. So far, I have determined that an updated .class file is produced in the target directory, and that the class of the same name...

Prevent Rails from caching a password

I'm setting up an edit profile page. And the password is available for change on it. The only problem is that the password_field gets prepopulated with the password, and when they just want to change their name, they must also change their password as well. Does anyone know a common workaround to this? ...

Is there a limit to how much data I should cache in browser memory?

I need to load a couple thousand records of user data (user contacts in a contact-management system, to be precise) from a REST service and run a seach on them. Unfortunately, the REST service doesn't offer a search which meets my needs, so I'm reduced to just loading a bunch of data and searching through it myself. Loading the records i...