caching

Jeditable retrieve cached results using LoadURL option

I'm using the jQuery jEditable plug-in to edit some part of a website. As the text use Textile format, I use the LoadURL option to bring in the unformatted data. The problem arise when the user edits some text, and then go back to re-edit it, the ajax call brings back the cached result. I've tried to add a random parameter, but the ...

How to properly cache files in php

Hello, I have a page with a post and multiple comments, by using PHP's ob_start() I am able to cache it successfully. Next to each comment I have a username and its number of current posts and reputation. Now I am keeping the cache of the page with the post all until someone adds a new comment, only then I update the cache file. Now t...

Caching user data to avoid excess database trips

After creating a proof of concept for an ASP.NET MVC site and making sure the appropriate separation of concerns were in place, I noticed that I was making a lot of expensive redundant database calls for information about the current user. Being historically a desktop and services person, my first thought was to cache the db results in ...

Response.CacheControl not working in firefox or chrome

i have this code in global.asax.vb, to disable the back button. Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) Response.Buffer = True Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0)) Response.Expires = -1 Response.CacheControl = "no-cache" End Sub this code works perfect...

IE Caching issue is breaking my lookup field.

I'm doing a project which uses javascript to get info from a view (written in Python and using the Django interface) based on the text a user enters in a field (querying on every keyup), and then display that info back. Basically, this either displays 'no job found' or displays the name, username, and balance for that job. In Firefox, ...

MGTwitterEngine - efficient way to get and cache profile imags

What is the most efficient way to get and cache a profile image for a user using MGTwitter? Our problem currently is that there must be a call to getUserInformationFor to get the url of the image, then getImageAtURL resulting in two calls to the server. Currently, we just need the image information, so its redundant to have to download ...

ASP.NET MVC 2 user control caching

Hi guys, I've recently decided to try out MVC 2 and coming from a webforms background, I'm having a little trouble trying to figure out the best practice solution to caching data provided to a partial view (user control). In my webforms application, I have an AccountSummary.aspx page, which has a Booking.ascx control. Booking.ascx had ...

Caching sitemaps in django

I implemented a simple sitemap class using django's default sitemap app. As it was taking a long time to execute, I added manual caching: class ShortReviewsSitemap(Sitemap): changefreq = "hourly" priority = 0.7 def items(self): # try to retrieve from cache result = get_cache(CACHE_SITEMAP_SHORT_REVIEWS, "sit...

How to enable WCF server side caching?

Is it possible without writing your own proxy? I have thought of using an open source proxy but it would only work with http bindings. ...

ASP.NET Cache - Callback versus Refresh - How to decide?

Does a callback put more strain on a server in terms of cpu because it has to watch for a change all the time? I suppose a refresh makes code a little less manageable in that you have to find the place where the cache is being refreshed and there might be a tendency to forget to add the refresh? When the cache is being refreshed, the p...

bad ETag value in test and production environment

i'm using the new caching solution for Rails as described here. the development environment works fine, but the test and production sends invalid ETag header ignores the parameter of the stale? function. heres is the corresponding part of one of my controllers: def index @categories = Category.all if stale?(:etag => @categories) ...

Cache ASP.NET page for anonymous users only

Is there an easy way to cache ASP.NET whole page for anonymous users only (forms authentication used)? Context: I'm making a website where pages displayed to anonymous users are mostly completely static, but the same pages displayed for logged-in users are not. Of course I can do this by hand through code behind, but I thought there mi...

Caching a resultset

My app will retrieve a countylist from MySql using a datasource bean. Since all pages will potentially use the same recordset every time I could store the countrylist as a List in some global bean, safe in this case. I could manage to refresh the list any time I want... but when things become more complex what is the best strategy for it...

how to cache a control, js files and css files in .net?

Hi All, I have a master page, inside that I have a menu controls and other css, JS files. Whenever I refresh the page from client, everything is coming from the server. Now I want to cache those controls and those files as per session. Is there any setting or programmatic settings there to do it? ...

HTTP if-none-match and if-modified-since and 304 clarification in PHP

My question is about how to reply a HTTP 304 "Not Modified" when I receive both if-none-match and if-modified-since from a proxy/client request. From RFC 2616 secttion 14.26 ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26 ): If none of the entity tags match, then the server MAY perform the requested method as i...

nhibernate: Why is my entity not loaded into the first level cache?

I'm loading an instance twice from the same session, but nhibernate returns two instances which I am assuming means that the entity is not in the first level cache. What can cause this sort of behaviour? Test: using (new TransactionScope()) { // arrange NewSessionUnitOfWorkFactory factory = Creat...

Why does Response.Redirect sometimes pull from cache?

I've noticed that when I Response.Redirect to an .aspx page, it sometimes displays a cached page instead of actually executing the page and pulling fresh data from the database. I'm not using output caching or anything special in .Net here -- this is a CRM, and the caching is either happening on the client or, perhaps more likely, autom...

Http caching - style.css?123 or style_123.css?

I'm currently playing around with a build / deployment script for minifying static resources. Following good practice I'd like to set an expire header far into the future for most of my javascript, stylesheet and images. To my question, when one or more of the static files has changed clients should ask for the newest version of the fi...

A question about caching in CakePHP

I'm planning on using caching in CakePHP. I'm wondering what happens if I updated the data on my tables, will CakePHP re-cache my data? Thanks in advance! ...

image caches (sqlite)

hi there i'm new to iPhone dev so plz be gentle ... i've created an iphone app which uses CoreData sqlite DB i've very more than 50 pic with huge size in my DB when i display an image it won't be deleted from memory when i get out from the view (cache) -(void)loadView{ [super loadView]; self.title = @"Photo"; imageScrollVi...