caching

Cannot update models whith page caching

I have a very fundamental understanding problem with Rails page caching mechanism. On a rails 2.0.5 application, I use a lot of full page caching, everything's working fine, pages are served at great speed by apache. So far all the content was handled in an admin section, the cache sweepers are working well. But I have now opened the ...

Is the ASP.Net Cache shared between different user sessions?

In a page if I do the following: Cache["key"] = myObject; Is that cached object available for requests that are for other users? ...

What is the best way to get the hash of a QPixmap?

I am developing a graphics application using Qt 4.5 and am putting images in the QPixmapCache, I wanted to optimise this so that if a user inserts an image which is already in the cache it will use that. Right now each image has a unique id which helps optimises itself on paint events. However I realise that if I could calculate a hash...

How to avoid client caching with CDN

Working on a project in AS3 I require to stream a few files for bandwidth testing purposes. The files needs to come from the CDN (the clients closest proxy) in order to make the bandwidth test reliable. Of course if the remote files get cached in the clients browser the bandwidth test would not be reliable. Usually I would add a time-s...

How can I make my simple .NET LRU cache faster?

UPDATE: Hey guys thanks for the replies. Last night and tonight I tried a few different approaches and came up with one similar to the one laid out below by Jeff (I had even already done what he suggested in his update, and put together my own simple LL implementation for additional gains). Here is the code, at this point it doesn't lo...

Cache directory structure

I'm in the process of implementing caching for my project, after looking at cache directory structures, I've seen many examples like: cache cache/a cache/a/a/ cache/a/... cache/a/z cache/... cache/z ... You get the idea. Another example for storing files, let's say our file is named IMG_PARTY.JPG, a common way is to put it in a direc...

linq cache and disposing datacontext

After disposing my datacontext, linq still holds data for other separate calls with new datacontext to those entities. Shouldnt this have been been cleared? ...

Getting Firefox 3 to work with JSUnit

Thus far this is what I've tried, I'm using Firefox 3.07 Make sure in about:config that the property browser.cache.check_doc_frequency is set to 1 which the browser interprets as "check for a new page every time". Make sure in about:config that the property security.fileuri.strict_origin_policy is set to false. When opening your browse...

Streaming output to a file and the browser

So, I'm looking for something more efficient than this: <?php ob_start(); include 'test.php'; $content = ob_get_contents(); file_put_contents('test.html', $content); echo $content; ?> The problems with the above: Client doesn't receive anything until the entire page is rendered File might be enormous, so I'd rather not have the wh...

Implementing a cache

Hi, I'm trying to implement a transparent cache that can load a specific object when it's not available, or return an already existing object indexed by (name). I've tried running this: loader' objs name = case findObj objs name of Nothing → (new_obj, loader' new_objs) Just obj → (obj, loader' objs) where new_objs = [(name...

N2 MVC controller action caching?

Hi all, I've got a really odd problem when using N2 with MVC. It seems to be related to the N2 side of things, as it doesn't happen within a purely MVC only app I wrote to test. Basically, when making calls to controller actions from within a page, the controller action parameters act as if they're being cached if they get called more t...

large object cache

I have a .NET2.0 C# web-app. It has a variable number of large, init-expensive objects which are shared across multiple requests but not sessioned to any given user. I therefore need to persist them in a lookup structure. These objects need to be created as required and are not required for the lifespan of the app, merely the lifespan of...

How does the ASP.NET Cache work?

I am interested in using the ASP.NET Cache to decrease load times. How do I go about this? Where do I start? And how exactly does caching work? ...

Caching ASP.NET AJAX service javascript proxies

We have a number of small but useful WCF services which are being hosted using the WebScriptServiceHostFactory class and consumed via ASP.NET AJAX. We've noticed that in our production environment that the javascript proxies are not being cached by the client. Is there anyway to allow these files to be cached? ...

Caching Function Results in SQL Server 2000

I want to memoize function results for performance, i.e. lazily populate a cache indexed on the function arguments. The first time I call a function, the cache won't have anything for the input arguments, so it will calculate it and store it before returning it. Subsequent calls just use the cache. However, it seems that SQL Server 20...

Caching query results in ORMs - satisfying arbitrary subset queries

I know N/Hibernate uses a cache to satisfy queries that it has seen before, and that is called a query cache. However, can it satisfy a subset of that query? I'd imagine not since I'd guess that the general problem of figuring that out is undecidable. Are there any strategies for doing this, though? Say I have a query for all widgets wh...

IIS7 Cache-Control

I'm trying to do something which I thought would be fairly simple. Get IIS 7 to tell clients they can cache all images on my site for a certain amount of time, let's say 24 hours. I have tried the step on http://www.galcho.com/Blog/PermaLink.aspx?guid=490f3c31-1815-40fc-a871-5d6899fa35e0 but to no avail. I still get requests going to...

AJAX and Javascript cache efficiency question

I am building a simple blog which is viewed single-page (do not worry, it is progressively built) and thus I am sending AJAX requests which return HTML to be inserted into the page. What is the most efficient way to store/cache information (HTML) to be added at a later time into the DOM? How much information (old entries which the user...

Object integrity and caching in a stateful client

I'm wondering what strategies exist to handle object integrity in a stateful client like a Flex or Silverlight app. What I mean is the following: consider an application where you have a Group and a Member entity. Groups contain multiple members and members can belong to multiple groups. A view lists the different groups, which are laz...

High performance serialization: Java vs Google Protocol Buffers vs ... ?

For some caching I'm thinking of doing for an upcoming project, I've been thinking about Java serialization. Namely, should it be used? Now I've previously written custom serialization and deserialization (Externalizable) for various reasons in years past. These days interoperability has become even more of an issue and I can foresee ...