caching

Is it possible to test whether XmlHttpRequest will hit the cache instead of the server?

In IE using Javascript, is there way to know if doing a regular GET on a URL using XmlHttpRequest will pull its data from the cache or hit the server? If there is no way to know in advance, is there a way to tell XmlHttpRequest to NOT hit the server, and instead pull from the cache if possible? To clarify: I understand how browser cach...

Page Caching, best practice on automatic expires/sweepers.

I've never really delved into the amazing cache techniques Rails provides until now. One thing that I really can't wrap my head around is how to resolve a this particular problem. Given that I have a Blog model with many Posts: class Blog < ActiveRecord::Base has_many :posts end class Post < ActiveRecord::Base named_scope :publish...

NHibernate: How do I ignore the cache and go directly to the database?

Consider a typical NHibernate context class. public class SampleContext : NHibernateContext { public SampleContext(ISession session) : base(session) { } public IQueryable<Person> People { get { return Session.Linq<Person>(); } } public Person GetPerson(int id) { get { return Session....

Php and mysql caching

I am currently working on a php/mysql project with the AbleDating system, my customer is worried about server load so he asked me to use "caching" as much as I could, he asked me to cache mysql query and some html zones... Is that possible to cache only some html zones with php? If yes how can I do this? For the mysql caching is it jus...

What determines which local SQL Server cache tables can be cached?

I have a c# Visual Studio app. I connected to an existing SQL Server 2008 database and the Studio created a local cache (.sdf file) for me, caching all existing tables. Now I added 2 additional tables the the SQL Server database and want to update my DataSet with these, but the wizard does not allow me to select the new tables as being ...

How to configure cache for static resources in web.xml for Jetty?

I was reading this: http://docs.codehaus.org/display/JETTY/LastModifiedCacheControl It says "The Jetty default servlet allows the cache control header to be set for static content by using the cacheControl init parameter using <init-param> <param-name>cacheControl</param-name> <param-value>max-age=3600,public</param-value> </init-par...

How to force fragment cache on rails from cron schedule?

Is there any way I can trigger a page to be fragment cached without having someone to load the page the first time? I am planning to use cron schedule, this is because my cron scheduler updates the database and that's when I want to force the fragment cache to happen. Thanks. ...

Stateless session bean result caching ?

We're running a Stateless Session Bean to retrieve some data from various locations. What's the best way to achieve caching for this SLSB ? Using interceptors ? Using JBossCache ? We're using JBoss 5.0.1. ...

Advantages of ETags verses updating URL

ETags allow browsers to perform conditional GETs. Only if the resource in question has been altered will the resource have to be re-downloaded. However, the browser still has to wait for the server to respond to its request. An alternative to ETags is to introduce a token into the URL pointing to the resource: http://example.com/css/st...

Passing build timestamp to code

I would like to give my CSS and javascript files far-future headers and add a token onto the URLs referrring to them. That way browsers don't have to re-download CSS and javascript unless I've released a new build of the site. http://example.com/css/styles.css?build=23424 How can I pass a build number or timestamp to my code-behind so ...

How to use Zend_Cache Identifier ?

Hi Folks, i think iam getting crazy, iam trying to implement Zend_Cache to cache my database query. I know how it works and how to configure. But i cant find a good way to set the Identifier for the cache entrys. I have an method wich search for records in my database (based on an array with search values). /** * Find Record(s) * Re...

Rails Page Caching not working and Action Caching throwing 'Filter Chain Halted'

Hello, setup Controller -> Action Index results = Model.all (SQL Call) View Loop through and render partial from results. Call count for result row (SQL Call) Partial Manage result data and add point on Google map I'm attempting to cache this page so I add caches_page :index to my controller. When I view this page it ...

HTML <meta> tag and squid

Does the HTML tag: <META http-equiv="Cache-Control" content="no-cache"> <META http-equiv="expires" content="0"> <META http-equiv="Pragma" content="no-cache"> also instruct squid to not cache that particular page? Or is it only telling the user's browser to not cache it locally in his/her machine? ...

Need temporary Client-side solution for handling browser "Back" button

At this moment I cannot make changes to the code behind for a few weeks, but can change the .aspx file. We have some internal users that will click the IE7 "back" button to navigate back 5 or 6 pages (which is specifically against stated rules and training). There are a very few pages where this is causing us major problems with duplic...

How do I avoid having JSONP returns cached in an HTML5 offline application?

I had good luck with cached offline apps until I tried including data from JSONP endpoints. Here's a tiny example, which loads a single movie from the new Netflix widget API: <!DOCTYPE html> <html manifest="main.manifest"> <head> <title>Testing!</title> </head> <body> <p>Attempting to recover a title from Netflix now.....

Best practices on cache implementation

I would need to implement cache, which would need to perform SQL queries and cache results. So, I would love to read something about best practices of doing that; how do properly, staling cache results, checking, etc. Particularly, I would probably benefit from learning how Hibernate is doing that? Or some other good players :-) ...

ASP.NET MVC and role caching?

Hello, I am developing an ASP.NET MVC app with custom membership and role providers. My custom role provider uses LinqToEntities to query the user/role mapping table and retrieve if a user is in a role or not. When running on debug, local machine, everything is fine. When deploying on IIS7 however, I have this strange behavior: When I...

C# force page load on browser back click

I'd like to know how I can detect that the back button is clicked from the browser. I have the following situation. On my website I have a search form. When you perform two search actions and then click the back button, the values of my dropdownbox are not stored correctly. Imagine you search the first time on keywords, after that you...

Stop images from caching in Rails and browser?

I have created a image crop facility that I can click on an image and crop it and it saves the new cropped image over the old one, then redirects back to the original page where the image was show. But it still shows the old image even after a redirect and doesn't display the new one till I refresh the page. I have tried just using an ...

HTTP Caching Testing

I have a proxying system that needs to understand the HTTP Cache-Control headers. The intent is not to perform any actual caching, but to derive tuning information based on the caching characteristics of sets of HTTP requests. I'm looking for a way to test the system. I can do spot checking by pushing content from well-known websites ...