caching

IE6 and Caching

It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on. Is there a specific HTTP Header that IE6 does listen too? ...

Load readonly database tables into memory

In one of my applications I have a 1gb database table that is used for reference data. It has a huge amounts of reads coming off that table but there are no writes ever. I was wondering if there's any way that data could be loaded into RAM so that it doesn't have to be accessed from disk? I'm using SQL Server 2005 ...

How to cache ASP.NET user controls?

I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page. I think my header control which displays static content and my footer control could benefit from being cached. How can I go about caching just those controls? ...

Substitution Control at the User Control Level?

I am trying to create some cached user controls. Basically Header and Footer are static. Except the footer has one link that reads in the url of the page and puts it into the javascript for sending a link to a friend. So I need that link to be dynamic. I set up a substitution control and had the static method return the dynamic link...

How to maintain Hibernate cache consistency running two Java applications?

Hi, Our design has one jvm that is a jboss/webapp (read/write) that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships. We then have a separate jvm that is the server using this data. As it is running continuously we just have one long ...

Making sure a web page is not cached, across all browsers.

Our investigations have shown us that not all browsers respect the http cache directives in a uniform manner. For security reasons we do not want certain pages in our application to cached, ever, by the web browser. This must work for at least the following browsers: Internet Explorer versions 6-8 FireFox versions 1.5 - 3.0 Safari ver...

Django Sessions

I'm looking at sessions in Django, and by default they are stored in the database. What are the benefits of filesystem and cache sessions and when should I use them? ...

Enabling Hibernate second-level cache with JPA on JBoss 4.2

What are the steps required to enable Hibernate's second-level cache, when using the Java Persistence API (annotated entities)? How do I check that it's working? I'm using JBoss 4.2.2.GA. From the Hibernate documentation, it seems that I need to enable the cache and specify a cache provider in persistence.xml, like: <property name="hib...

Help with aggressive JavaScript caching

I've run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn't see the changes. It holds onto the copy cached in the browser, even though the web server has a newer version. Not until I force the browser to clear the cache do I see the changes. Is this a web-server co...

How do I implement a HTML cache for a PHP site?

What is the best way of implementing a cache for a PHP site? Obviously, there are some things that shouldn't be cached (for example search queries), but I want to find a good solution that will make sure that I avoid the 'digg effect'. I know there is WP-Cache for WordPress, but I'm writing a custom solution that isn't built on WP. I'm ...

web page cache setexpires

Will the code below work if the clock on the server is ahead of the clock on the client? Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1)) EDIT: the reason I ask is on one of our web apps some users are claiming they are seeing the pages ( account numbers, etc ) from a user that previously used that machine. Yet we use the line ...

Hibernate - maxElementsOnDisk from EHCache to TreeCache

Hi, I'm migrating a Hibernate application's cache from EHCache to JBoss TreeCache. I'm trying to find how to configure the equivalent to maxElementsOnDisk to limit the cache size on disk, but I couldn't find anything similar to configure in a FileCacheLoader with passivation activated. Thanks ...

How to prevent IE6 from refetching already-fetched images added via DOM manipulation

If you add a image to your browser's DOM, IE6 will not check its cache to see if it already downloaded the image but will, instead, re-retrieve it from the server. I have not found any combination of HTTP response headers (of the ensuing image request) to convince IE6 that it can cache the image: Cache-control, Expires, Last-modified. ...

Is there a way to keep a page from rendering once a person has logged out but hit the "back" button?

I have some website which requires a logon and shows sensitive information. The person goes to the page, is prompted to log in, then gets to see the information. The person logs out of the site, and is redirected back to the login page. The person then can hit "back" and go right back to the page where the sensitive information is con...

What's the best way to load highly re-used data in a .net web application

Let's say I have a list of categories for navigation on a web app. Rather than selecting from the database for evey user, should I add a function call in the application_onStart of the global.asax to fetch that data into an array or collection that is re-used over and over. If my data does not change at all - (Edit - very often), would...

akamai caching and site rendering

I am the web guy for a large TV station. Our site is cached by Akamai. Pages render perfectly in our testing environment (not cached) and on our "origin" page (again, not cached), but when they are viewed on our live environment (the cached site), they do not render exactly the same as how I coded them. Maybe it's a tiny bit of spacing, ...

Caching compiled regex objects in Python?

Each time a python file is imported that contains a large quantity of static regular expressions, cpu cycles are spent compiling the strings into their representative state machines in memory. a = re.compile("a.*b") b = re.compile("c.*d") ... Question: Is it possible to store these regular expressions in a cache on disk in a pre-compi...

Java applet cached forever, not downloading new version?

We have a case where clients seem to be eternally caching versions of applets. We're making use of the <param name="cache_version"> tag correctly within our <object> tag, or so we think. We went from a version string of 7.1.0.40 to 7.1.0.42 and this triggered a download for only about half of our clients. It doesn't seem to matter whi...

Does Java save its runtime optimizations?

My professor did an informal benchmark on a little program and the Java times were: 1.7 seconds for the first run, and 0.8 seconds for the runs thereafter. Is this due entirely to the loading of the runtime environment into the operating environment or is it influenced by Java's optimizing the code and storing the results of those optim...

How can you insure your code runs with no variability in execution time due to cache?

In an embedded application (written in C, on a 32-bit processor) with hard real-time constraints, the execution time of critical code (specially interrupts) needs to be constant. How do you insure that time variability is not introduced in the execution of the code, specifically due to the processor's caches (be it L1, L2 or L3)? Note ...