caching

How to determine the size of an ASP.net Cache Item?

I know that its possible to get the total size of the ASP.net Cache (http://stackoverflow.com/questions/344210/how-to-determine-total-size-of-asp-net-cache) But is it possible to break down the that total into the individual items stored in cache? Thanks for your help! ...

ASP.NET Data Cache - preserve contents after app domain restart

I am using ASP.NET's data caching API. For example: HttpRuntime.Cache.Insert(my_data, my_key); Is there any way to configure cache so its contents are preserved when the App Domain recycles? I load many object into cache, but there is a substantial delay re-loading these every time the app domain restarts. Assume for this question th...

Site images don't refresh after setting expired headers on .htaccess

I have a site that uses a CSS sprite for all the images. I set the .htaccess file to set the expired headers to a future time as they recommend to improve site performance. However, when I updated the sprite image none of my browsers on two different computers seem to fetch the new image. I deleted the .htaccess serveral times but no l...

Symfony cache is breaking my flash messages

Flash messages in Symfony projects give feedback to website users after an action is performed. They usually only show for one page load after the action is triggered. Unfortunately, when caching is turned on my messages fail to appear and only the cached version of the page is returned. In one instance a version of a page with a mes...

Local Data Cache Sync does not save client changes to sdf file

I created a new c# project and follwed the steps from this tutorial to create a LocalDataCache: http://www.codeproject.com/KB/database/AdoSyncServicesArticalPKg.aspx?fid=1526739&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2794305&fr=1#xx0xx I next added the following code: using System; using Syste...

Distributed caching on 64-bit Windows machines

Are there any production-ready distributed caching mechanisms like memcached that can be used in a Windows 64-bit environment? From what I've seen, memcached is run on linux machines in production environments, however I don't have control over the fact that we will be using 64-bit Windows machines. Additional requirements include for ...

Disk-based database caching: Disadvantages?

I'm running a database-backed web site on shared hosting that occasionally gets swarmed after a mention on a link sharing site. Because of how much load the first couple of traffic surges put on the database, I have implemented file-based caching. When a query runs, I just serialize the resultset object and save it to a file. I have a ...

ASP.NET Cache.SetCacheability(HttpCacheability.Public) not setting header

I have an HttpHandler (have also done this as an ASPX page) that retrieves an image stored in the db and writes it out to the response. I have added the following lines to the code to try and get the images to cache in the browser, but whenever I look at the response in Firebug, it always has a cache-control header value of "private". R...

Is there a big performance hit with using file_store for storing the cache as opposed to mem_cache_store?

I don't think I'm at the point where I need to go through and get memcached setup for my Rails app, but I would like to do some simple caching on a few things. Is using file_store for as the config.cache_store setting sufficient enough? Or will having to access files for data over and over kill the benefit of caching in the first place ...

Selectively cache .js and .png files over https?

We are creating a large secure back office web application in ASP.NET. All access to the site is over https connections, and we'd like to either turn off caching for pages or set caches to expire quickly. However, the site uses quite a few images and largish javascript files/libraries. Is there a way to selectively cache certain fil...

Manage NHibernate second level cache

I just started thinking about using the NHibernate second level cache in one of my apps. I would probably use the NHibernate.Caches.SysCache.SysCacheProvider which relies on ASP.net cache. Enabling the cache was not a problem, but I am wondering on how to manage the cache e. g. programmatically removing certain entities from the cache e...

How to access Firefox cache from webdriver?

Hello, I'm able to access pages like about:cache-entry?client=HTTP&sb=1&key=(some URL) directly in Firefox, but when it renders the page, it certainly gets the data from some storage. How can I access the latter from Python Firefox Webdriver? ...

Caching item IDs in a memory table - good/bad?

I was thinking....I have a site where there is a lot of searching/sorting going on. What if I cached the result item IDs for each search into a MEMORY table, and then simply did WHERE item_id IN ("1", "5", "44", "67"). If there is no value for the particular query, it does the full query, and writes the IDs into the MEMORY table. Will...

Checking for PHP session without starting one?

Is it possible to check for a session with out starting one? The reason that I ask is, the app I am developing has an integrated admin interface. So when an admin is logged in they browse the same pages as the users to make their edits. Fields and options are shown based on the users privs. This is causing two problems. One is Becau...

Save database calls - display one row at a time

Let me start by explaining my scenario: I am developing a quiz engine in C# Asp.net. There is an option to display one question at a time. Since there will be a lot of users accessing the quiz, I do not want to make database calls for each question. Ideally I want to load all the questions on page load, and somehow display one question ...

Share variable between controller and helper in Rails

Hi! I have a little bit of trouble creating a menu in Rails. In ApplicationController I have a set_menu method: def self.set_menu(menu, options = {}) # ... end This is called from each controller like this: class UsersController < ApplicationController set_menu :users # ... end In set_menu, I need to create a variable that ...

Rails: Sending cached gzip content directly to client using caches_action

I am using caches_action to cache one of the action's response I want to save in the cache compression response and then send it as it is if browser supports that compression otherwise decompress it and then send it. Some characteristics of my content: 1. It rarely changes 2. My server gets requests from 90% gzip enabled browsers Do y...

How do I test a generic type variable for equality with Default(T) in Delphi?

I'm trying to write a generic cached property accessor like the following but am getting a compiler error when trying to check whether the storage variable already contains a value: function TMyClass.GetProp<T>(var ADataValue: T; const ARetriever: TFunc<T>): T; begin if ADataValue = Default(T) then // <-- compiler error on this line ...

How do I expire a django template cache key on recieving a signal?

In my front page template I use the cache function like this: {% cache 86400 my_posts %} {% get_latest_posts %} {% endcache %} When there is a new post I would like to expire the cache key; like this: def clear_post_cache(): cache.delete('my_posts') post_save.connect(clear_post_cache, sender=Post) My problem is that the ca...

SQL Server 2005 Caching

It's my understanding that SQL Server 2005 does some sort of result or index caching. I'm currently profiling complex select statements which take several seconds to several minutes to complete. My problem is that a second run of a query never takes more than a second to run even if I don't alter it. I'm currently using SQL Server Manage...