caching

How do I exclude a property from being cached?

I’m caching an object but noticed that one of the properties is being combined with the parent object when it is supposed to only get its value if the object requests it after the initial caching procedure has occurred. So my two questions are: Why does the cache provider not just use the property variables (not the property function...

Looking for simple Java in-memory cache

I'm looking for a simple Java in-memory cache that has good concurrency (so LinkedHashMap isn't good enough), and which can be serialized to disk periodically. One feature I need, but which has proved hard to find, is a way to "peek" at an object. By this I mean retrieve an object from the cache without causing the cache to hold on to ...

Object cache for C#

I'm doing a document viewer for some document format. To make it easier, let's say this is a PDF viewer, a Desktop application. One requirement for the software is the speed in rendering. So, right now, I'm caching the image for the next pages while the user is scrolling through the document. This works, the UI is very responsive and i...

Spring-modules caching not working... silently.

I'm trying to use declarative caching from the Spring Modules project. It's not working ie. nothing appears to be getting cached. Here's my configuration: <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> </bean> <bean id="cacheProviderFacade" class="org.springmodules.cache.provider.eh...

How to implement a most-recently-used cache

What would be the best way to implement a most-recently-used cache of objects? Here are the requirements and restrictions... Objects are stored as key/value Object/Object pairs, so the interface would be a bit like Hashtable get/put A call to 'get' would mark that object as the most recently used. At any time, the least recently used ...

Platforms for running memcached

Is there any reason in particular why it's recommended to run memcached on a Linux server? Is it really that bad an idea to run it on a Windows Server box? What about an OS X Server box? The biggest reason that I read is about TCO. In other words, for each windows box that we run memcached on, we have to buy a copy of Windows Server ...

Is this a reasonable caching method?

I'm using PHP to render LaTeX to pngs as part of a CMS, I need some kind of simple caching mechanism because it takes the server about 2 seconds to render the png. I take the raw TeX and run it through the md5 function, then I insert the hash into the database along with the current timestamp, and use the <hash>.png as the filename. Ever...

What triggers cache removal in SqlServer 2000

Hi, I'm rewriting a stored procedure at work, primarily to stop it from doing dirty reading and have not made any significant structural changes. However, running the new version against the current version I have found the new version to run almost twice as long on a dev database which doesn't have a lot of activity! Following the adv...

What are some ways to optimize your use of ASP.NET caching?

I have been doing some reading on this subject, but I'm curious to see what the best ways are to optimize your use of the ASP.NET cache and what some of the tips are in regards to how to determine what should and should not go in the cache. Also, are there any rules of thumb for determining how long something should say in the cache? ...

WinForms App Data Caching - In Which Layer to Cache?

We have data that's updated nightly in a database residing in the same instance as my app's database. So to save on database calls, I want to cache this static-for-the-day data into a List(Of MyObject). From a theory point of view, should this cached List(Of ) be cached in the presentation layer code, via a global variable? Should it be ...

With Apache httpd, how do I configure no caching for a given UserAgent?

I have Apache HTTPD configured to add a cache header to requests for most static content: ExpiresActive On ExpiresDefault "access plus 1 year" # Force JNLP and BSH files to expire immediately so updates are checked for # and seen (We need this so we see changes in the dynamic content in both) ExpiresByType application/x-java-jnlp-file ...

asp.net sessionID changing on postbacks?

hello, I am writing an asp.net app that stored an object in cache. When the page loads the first time, it checks the cache for the object, if it is there, it will use the object. if the object does not exist, it will re-build it and store it in cache. since multiple users can use this app at the same time, i was trying to store the obje...

Why are images and javascript files included in DNN no longer cached on the client after I replace them?

I installed DotNetNuke version 4.9.2 and I'm watching the primed cache states using Firebug and YSLOW... All the images and javascript are cached on the client, unless I replace them... So If I upload a new LOGO image, it is no longer cached. The existing ones are cached. If i replace an existing .js file (I ran one through the minifi...

How return 304 status with FileResult in ASP.NET MVC RC1

As you may know we have got a new ActionResult called FileResult in RC1 version of ASP.NET MVC. Using that, your action methods can return image to browser dynamically. Something like this: public ActionResult DisplayPhoto(int id) { Photo photo = GetPhotoFromDatabase(id); return File(photo.Content, photo.ContentType); } In the ...

Managing Duplicate Downloads

At my firm, we mostly self-administer software installations on our individual machines. Often several users download the same file. Is there a tool which can be used to cache downloads and queue new download requests? I am looking for a solution where the user is informed about a previously downloaded copy if one exists locally but stil...

What are some of the methods that can be used to avoid a page being cached by the browser?

I have a user that is trying to view the questions of an online exam. During the exam they select 1 of 4 answers and click "Answer". For this user it seems to load the same page/question over and over again, where as it should advance to a new question after every question answered. My guess is that it's caching, but it doesn't seem to b...

MVC Framework Browser Caching Issue with RC1

In my latest project which is in RC1 I have noticed that I have this browser caching issue that I just can't shake. This is what my header looks like HTTP/1.1 200 OK Date: Tue, 03 Mar 2009 15:11:34 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 X-AspNetMvc-Version: 1.0 Cache-Control: private Expires: Tue...

OutputCache and RenderAction cache whole page

I have a ViewPage that contains <% Html.RenderAction<MyController>(c => c.SidebarStats()); %>. On the controller action for the action SidebarStats I have an OutputCache action filter to cache only that part of the page. However, the whole page is getting cached and not just that action. I remember seeing somewhere that this might be ...

How to use global caching in php?

ello all im new to php and server scripting ( coming from the java/cpp background ) my question is , if i like to be able to build some kind of single tone cache that will hold me data in memory in all the web application life , something that when i start the web server it will start main cache that will server the web application not ...

Retrieving expired objects in Ehcache

I'd like to implement the following algorythm above Ehcache : try to get an element from the cache if the element is not expired serve the value else serve the expired value refresh the element in the background But I never get an expired element (Element.isExpired()). I tried to play with my cache configuration (especially TimeT...