caching

readfile/fpassthru web caching

I have noticed that files delivered by PHP through readfile or fpassthru techniques are never cached by the browser. How can I "encourage" browsers to cache items delivered via these methods? ...

Response.Flush breaking Page Caching

I have some code that is used to replace certain page output with other text. The way I accomplish this is by setting the Response.Filter to a Stream, Flushing the Response, and then reading that Stream back into a string. From there I can manipulate the string and output the resulting code. You can see the basic code for this over at...

Flash CS4 refuses to let go

I have a flash project; it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought we were ready - I thought it was time. The new Jenine was better in every way - she had lost some code bloat, she had decoupled herself from a...

Use OutputCache Directive with Themed Usercontrol

Is there a way to use output caching with a user control that is themed? Whenever I add the directive to my usercontrol I get this parser error: The 'ID' property of a control type ASP.controls_hotcontent_ascx cannot be applied through a control skin. The Error-source shows the skin-file for the usercontrol. Here's the directive ...

Should I cache the hash code of an STL string used as a hash key?

I've doing some performance analysis on the software I develop, and I've found that lookups on a global dictionary of URL's takes about 10% of the application's "load" phase time. The dictionary is implemented as a C++ STL std::map, which has O(lg n) lookups. I'm going to move it to a hash_map, which has roughly fixed time lookups. Th...

How to configure static content cache per folder and extension in IIS7?

I would like to set up rules in IIS7 for static content caching in my ASP.NET website. I have seen these articles, which details how to do it using the <clientCache /> element in web.config: Client Cache <clientCache> (IIS.NET) Add Expires or Cache Control Header to static content in IIS (Stack Overflow) However, this setting ap...

Prevent an HTTP client from hitting a server with cache (iphone)

Ok, I'm confused. I'm trying to send back the magic headers from my server that will prevent a client from hitting the server again until a resource is stale. I understand how ETag or Last-Modified works (Validation) - the client will ALWAYS still hit the server, and the server needs to validate the date or etag against the current val...

Priming or warming cache in SQL Server

When I am testing a query I will typically drop the following lines in front of whatever i am testing to make sure I'm starting from the same baseline every time i run a query. CHECKPOINT GO DBCC FREEPROCCACHE GO DBCC DROPCLEANBUFFERS GO EXEC sp_MyProc 12345 On the Stored proc i was running today i noticed that when I ran it with thes...

Caching with variation by RouteValue

I have an Action that has diferent results depending on some route value. ie www.mysite.com/Home/About/Value1 is different then www.mysite.com/Home/About/Value2. Is there any chance I can use OutputCache on the action About in controller Home with diferent output for www.mysite.com/Home/About/Value1 and www.mysite.com/Home/About/Value2...

caching remote json (or xml) calls (from webservices)

Any clues on how to do it ? ...

Does meta tag no-cache prevent router caching?

I have the following meta tags that supposedly prevents browser caching <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="-1" /> Does this prevent a caching server from holding the content as well, if it doesn't, is there a way to prevent router/server caching? ...

TDBadgedCell keeps caching the BadgeNumber

For a project I'm working on I'm using the TDBadgedCell as written by Tim Davies. While the cell works fine for the most part, the BadgeNumber keeps getting cached. I'm wondering how I can fix this. My [tableView:cellForRowAtIndexPath] message looks like this: - (UITableViewCell *)tableView:(UITableView *)_tableView cellForRowAtIndexPa...

HSQL, In-memory databases, Java and PHP question

I'm investigating options to create a database cache using HSQLDB in an in-memory mode. The idea is that the cache will be queried from a PHP application and the query will be passed to a Java application that runs the HSQLDB database. Now, I've been thinking this through and I can't see any efficient way to pass the data from Java bac...

Efficient db design for retrieving 'most popular' table rows

I am planning to create a mysql 5 (myISAM) table that will contain x thousand rows of data. Each row will have a count field, & the rows with the 20 highest count values will be retrieved quite a lot, probably on a one-for-one ratio to every row update. The x thousand rows not in this 20 will not typically be retrieved. What are the c...

What is the best way to do server-side output caching in PHP?

I have a pretty complicated index.php now, and I would like to only run it once every hour. What is the best way to achieve this? Some ideas I've had Put it in APC with apc_store($page, 60*60*) - I feel this isn't what APC is for and will probably be doing something bad to the other parts of my site Save the output to a filesystem som...

IIS Settings for using HTTPRuntime.Cache

I use HTTPRuntime.Cache in my WCF service. It works locally (I mean "localhost:1234", not in IIS). But it doesnt work at server IIS. Is there any settings to do in IIS? The code in my method is like: var response = (Response<CommonListObjects>) HttpRuntime.Cache.Get("commonObjects"); if (response!=null) { return response; } var se...

Stop Images Disappearing when scrolling UITableView

I have a UI Table View Controller. Each Cell Loads an image from my webserver. If I scroll the TableView so that a particular cell scrolls out of view and then scroll back again the image for that cell has vanished and I have to wait for it to reload. I'm guessing this is some performance/ memory management thing build into iphone? How...

Hybrid Rails Caching Options, am I reinventing something?

Well, not really reinventing, however, we have a large content-based website which handles load (after we fixed the SQL pooling issue) to a certain point, then we just run out of steam. A lot of this is due to bad code we are trying to fix up, but a lot is just due to the level of requests etc. We were considering page caching, because ...

Even after loging out I can go back to the home page using BACK button!

Hello, I am using ASP.net with C#.After I logout its possible to go back to pages using back button.I could fix the prob for the login.I have prob with the logout.I am using the inbuilt login page provided by the asp editor.Should I use sessions? please help. ...

Cache-Control HTML Headers

In an effort to tell a browser's cache how to treat my site, I wanted to write some cache control rules in the header. There is a great resource here, but I cant seem to find the correct cache control code for my situation. Because my website is static, I want the browser to always keep the data in its cache. BUT, the pages that do chan...