caching

Unusual javascript HTTP caching / undefined issues

Ok. I have never seen anything like this before and I am quite confused... On a website I am working on, there are two JavaScript includes. (Well, many more, but the problem occurs with only two). We'll call these A.js and B.js. A.js defines a JavaScript singleton A. Likewise B.js defines a JavaScript singleton B. The B class depends on...

Form Textbox Caching Problem

I have a PHP form, with various input fields and textboxes. If you submit and go back, all of the data that was submitted in the input fields remains, however the textboxes are blank. How can I get the data entered in the textbox to cache like the regular text inputs? ...

NHibernate Caching Objects Based on Parent Class's ID

I have the following definitions for the Animal and Dog types. Note that the ID for the object is the AnimalID: <class name="Animal" table="Animals"> <id name="Id" type="System.Int32" column="AnimalID"> <generator class="identity" /> </id> <property name="IsBig" column="IsBig" type="System.Bool" not-null="true" /> ...

Force clear EJB3 cache in Glassfish

I have application written in Java that is using EJB3 + Toplink. I'm using Glassfish as my app. server. Sometimes the data that has been cached is old and I need to clear my cache manually. I know that we can set time to clear it, but I would like to make a button that will manually clear it for me. Is is possible to do? ...

Is there an easy way to combine memcache and a disk cache in a Rail app?

My Rails app uses memcache for fragment, action and other caching but has a long tail of infrequently accessed items so its hard to keep them all in the cache without making it really huge and gobbling up dozens of gigs of server memory. But my caching servers do have hundreds of gigs of free disk memory that is unutilized, as do my app...

What proportion of users have the flex framework cached?

We have a Flex application which doesn't currently use the Flex framework as an RSL. We're considering switching, but we're not sure what proportion of users will already have the framework cached. There's an added complication in that we're using the data visualisation components too, and we may have a choice as to which version of th...

Start loading next page while browser is idle

I have product website. On one page I show thumbnails and a brief description of all the products. When you click on the photos, you get to a detailed product page. Is there a way to get the browser to start loading and caching the javascript and CSS for the "detailed product" page while the user is just looking at the "all the products...

How does the browser know a web page has changed?

This is a dangerously easy thing I feel I should know more about - but I don't, and can't find much around. The question is: How exactly does a browser know a web page has changed? Intuitively I would say that F5 refreshes the cache for a given page, and that cache is used for history navigation only and has an expiration date - which ...

Why doesn't my expires headers make my files stay in cache?

I'm using valid expires and no-cache headers for my static files and they stay cached for as long as I keep browsing, but when I close my browser and use it back after a while I see the static files loading again, even when not refreshing with ctrl (+ shift) + r I'm using Firefox, cache size set to 250MB and I don't let it remove any pr...

Search a file for a string, and execute a function if string not found; in python

def checkCache(cachedText): for line in open("cache"): if cachedText + ":" in line: print line open("cache").close() else: requestDefinition(cachedText) This code searches each line of a file (cache) for a specific string (cachedText + ":"). If it does not find the specific stri...

Does jQuery $(this) need to be cached.

Hello, I recently came accross some blog posts about jQuery performance (i.e. http://net.tutsplus.com/tutorials/javascript-ajax/10-ways-to-instantly-increase-your-jquery-performance/) and it was stated in all of them that we should cache the jQuery objects to javascript variables. What I need to know, though, is if this applies to $(th...

Clear the cache at a specific time in ASP.NET 2.0

So I have a process which runs at midnight which sets a start and end point for a flash object. This only needs to run once a day, so I'm obviously caching the result set. However, the problem I'm running into is, if the data is still cached after midnite, it's not pulling in the most correct data, until the cache expires. I basically...

Scaling Rails with Cache-on-write

I currently have a rails app that uses the traditional caching. cache do blocks are used to cache slow-rendering partials. This works great for the most part, except for a few pages which take too long to render on the first read. I'd like to move the rendering of these partials to the write-side from the read-side, by rendering in ei...

IIS 7 returning an old version of a constantly changing file

I'm trying to use IIS7 to host a HTTP Live Streaming server. For those not familiar with HTTPLS: an audio or video stream is broken into small segments and made available on a web server. Along with the segments an index.m3u8 file is created which is a flat text file that lists segments currently available for download in the order in ...

Cache Master Page in ASP.NET

How can I cache the master page in ASP.NET? ...

How to clear SQL Server query cache

I've got a simple query running against SQL Server 2005 select * from Table where Col = 'someval' The first time I execute the query can take > 15 secs. Subsiquent executes are back in < 1 sec. How can I get SS2005 not to use any cached results. I've tried runnning DBCC DROPCLEANBUFFERS DBCC FREEPROCCACHE but this seems to have no...

How can we clear the cached images when we clos the app?

I cache the images to the document directory of my app using the following code. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *saveDirectory = [paths objectAtIndex:0]; But even after I close the application, its still there. How can I clear it when I lose my app. I am doing...

How to use Squid(Proxy and reverse proxy) with joomla

hi i want some optimization tips on joomla performance i used memcache but i dont now how to use proxy and reverse proxy () with joomla please help Thanks ...

Way to synchronize two cores in simulation

Hi guys, I have to build a dual-core processor simulator in C (it's actually a multilevel memory simulation, cache L1/L2, block substitution, etc). Thing is, I'm having a hard time figuring a way to synchronize the cores (which I'm programming as threads). Any ideas how I could do a global clock? Should I change from threads to child pro...

Architecture question for implementation of a cache server

Hello. This is something of an architecture question. I have this idea of having a server with huge memory, that is used as a big objects cache holder. The clients send "Actions" to this server(like Search Person with property age<13). And then, this machine(to complicate things it would be nice to have more instances of this server and...