caching

Looking for a file-based cache on .NET / Key-Value Store with expiration

I'm looking for some convenient way to cache data on disk. Basically a key-value store with expiration and the value being (xml)serialized . Something that could be used like... var userCacheId = "3332"; var userData = cache.Retrieve( userCacheId, () => readUserDataFromDatabase(userCacheId), // Load delegate if not in cache ...

creating cache folder

Hi, I'm trying to cache an image obtain from a webside. However, CacheManager.getCacheFileBaseDir() always returns null. Do I need to create the cache folder in the android emulator? if yes, how can I do it? in which directory i need to create it in? Thanks in advance for helping. ...

Disable caching in System.Windows.Forms.WebBrowser

I am maintaining a .NET 2.0 application that uses a System.Windows.Forms.WebBrowser to display reports from Reporting Services 2005. Caching is disabled for all reports on the server, and this seems to work as expected. The problem is that the WebBrowser control insists on checking Temporary Internet Files for a cached copy of the repor...

Memcached vs SQL Server cache

I've been reading a lot of articles that suggest putting a Memcached (or Velocity, etc) in front of a database is more efficient than hitting the database directly. It will reduce the number of hits on the database by looking up the data in a memory cache, which is faster than hitting the database. However, SQL Server has it's own memo...

Android: Image cache stategy and memory cache size

Hi Guys! I'm implementing an image cache system for caching downloaded image. My strategy is based upon two-level cache: Memory-level and disk-level. My class is very similar to the class used in the droidfu project My downloaded images are put into an hashmap and the Bitmap objet is wrapped inside a SoftRererence object. Also every ...

Relational Database with cache-like drop behaviour

I am looking for a database system that should be a relational database. But a main feature has to be that it forgets entries to fit a certain condition, like 'least recently used' on a certain size of the DB. In other words, I want a kind of 'weak reference' in a DB. Is there already such a solution? What do you think about that idea:...

System.Web.Caching.Cache returning null for a key in the cache

I have some code(client side) that is trying to cache responses from a web service. I save the responses in a System.Web.Caching.Cache object gotten from System.Web.HttpRuntime. I make a call once, then i make it again and have a console output saying it loaded from cache. But I am never getting the console output. I ran it in a debu...

Disable (mako) template caching in Pylons 1.0

I recently jumped on a project using Pylons. I'm not familiar with either Python or Pylons, but I haven't had very much trouble getting the hang of things. Pylon projects seem to cache templates indefinitely by default and I can't figure out a way to clear the cached templates (stored by default in /data/templates) except by manually de...

Apache Handler to access POST data and then check for cached file

Hey folks, I an trying to do the following - 1) Access POST submission data in Apache 2) Create a file name by using some of the parameters in POST data from 1) I will like to then read the file from disk vs using back-end application to regenerate the page. Any help will be greatly appreciated. ...

php poor man's cache

I have some small sets of data from the database (mysql) who are seldom updated. Basically 3 or 4 small bi dimensional arrays (50-200 items). This is the ideal case for memcached, but I'm on a shared server and can't install anything. I only have PHP and MySQL. I'm thinking about storing the arrays on file and regenerate the file via a ...

Caching remote EJB 3.0 reference

Hello, I was thinking how could i save time on looking up remote ejb reference through jndi. I had an application that needed to work very fast, but it also had to call remote ejb which slowed it down. So my solution was something like this: I took apache commons-pool library and used its StackObjectPool implementation for my remote ej...

How to handle SQL query result caching

In a Perl program I cache SQL request result to speed up the program. I see two common way to do that: Create a hash using the query as index to cache result, like suggested here Create a hash with but 2 index, first is the list of used table, second is where clause I today used the 2nd option because it's easier to clean the cache ...

HTML Cache control

What is the difference between below 3 meta tags? <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="Expires" CONTENT="-1"> Do I need to use all those tags to avoid browser caching? ...

How to store affiliate ID correctly to browser.

I want to create a simple affiliate code. Currently I use PHP session to keep the affiliate ID. http://domain.com/aff.php?id=123 $_SESSION['referral'] = intval($_GET['id']); The problem now. Example user logged to affiliate area then logout, the $_SESSION['referral'] will unset & destroyed by session_unset() session_destroy() on lo...

Caching and saving frequently updated data

I'm working on a .NET data logging application that needs to accept data from a large number of clients and store it in a database. The client sends a start event to the server and then sends heartbeat events, causing the last activity time of the data to be updated. I can't use an end event because the client app may be closed with no ...

asp.net mvc membership - caches login info and shows on different applications

I've asked similar question here because I thought the problem was in my custom membership provider. Then I tried this: I created two NEW asp.net MVC applications. In first one, I registered as new user using default membership provider. I closed this application, opened second one and ran it. In this application I was also logged in a...

ASP.NET Cache expiration date not working

I'm using ASP.NET Cache in my website and recently I've noticed that items in it are still being retrieved after the expiration time has passed. I'm using Cache.Add() to add items, and setting the absoluteExpiration to the current time + 1 second: ConfigurationObject config = null; string configKey = moCode + serviceCode + "config" + l...

IE Memory Cache Viewer

Is there any tool which can be used to view the memory cache for Internet Explorer? I did try NirSoft's IECacheView which provided a nice view of IE's disk cache, but it could not examine the memory cache. ...

How to best cache server responses on server side with Jetty and Spring?

I'm using embedded Jetty 6 and Spring Web. What is the best way to cache served pages in this setup to avoid regenerating them on every request? ...

Android - drawing cache - when is it useful?

Hi I am reading about setDrawingCacheEnabled and getDrawingCache and I was wondering when is it good to use it or when its not good. Basically in my case I have an horizontalScrollView with many things inside it so its scrolls left/right and most of the things are not visible. If I use setDrawingCacheEnabled(true) on the views, does i...