caching

How to resize all images in a block of HTML to a specific width and cache the results

I'm writing a mobile content adaptation plugin for a bespoke CMS in PHP. The CMS contains links to images with absolute URLs which are all 400 pixels wide and vary in height. I'd like to parse the HTML (which is stored in MySQL) and re-scale each image to a new width - this will vary according to the device. I'd also like to cache the i...

Distributed Caching Help

I am trying to put some distributed caching into play, I'm using this indeXus.Net Shared Cache . It Requires that the object being cached is serializable, which it is here is the class object. [Serializable] public class Members { public Members() {} public Members(string aspnetusername, string aspnetpassword, str...

Easy, simple to use LRU cache in java

I know it's simple to implement, but I want to reuse something that already exist. Problem I want to solve is that I load configuration (from XML so I want to cache them) for different pages, roles, ... so the combination of inputs can grow quite much (but in 99% will not). To handle this 1%, I want to have some max number of items in c...

Compressing Memory Cache

Does anyone have any experience in using compression on their cached data? I understand that stackoverflow is internally using this method. What are the pros and cons? And are there any gotchyas? ...

What to cache when 99.9% of your data changes frequently?

Okay I know I asked about this before, and the answer was basically cache data that doesn't change often. Well what does one do when at least 99.9% of the data changes? In my project the only tables that doesn't get updated or won't get updated frequently would be the member profile info (name/address, and settings) So how does one st...

Lightweight Java Object cache API

Question I'm looking for a Java in-memory object caching API. Any recommendations? What solutions have you used in the past? Current Right now, I'm just using a Map: Map cache = new HashMap<String, Object>(); cache.put("key", value); Requirements I need to extend the cache to include basic features like: Max size Time to live ...

cache FreeMarker templates

Hi, I'm using the Spring class FreeMarkerConfigurationFactoryBean to retrieve FreeMarker templates. I would like these templates to be cached, but there doesn't appear to be any way to indicate that this behaviour is required. In contrast, Spring modules provides a CachingTemplateResolver which does provide template caching, but is it ...

Where should caching occur in an ASP.NET MVC application?

I'm needing to cache some data using System.Web.Caching.Cache. Not sure if it matters, but the data does not come from a database, but a plethora of custom objects. The ASP.NET MVC is fairly new to me and I'm wondering where it makes sense for this caching to occur? Model or Controller? At some level this makes sense to cache at the...

Does partial page caching exist outside of asp.net?

I use partial page caching with ASP.NET. I find it to be particularly helpful with large volume sites, where I need only certain sections of a page to cache. Do other web application platforms have this type of technology? ...

Should I still see the query hit in SQL Profiler?

I am currently building a web site and I just implemented SqlCacheDependency using LinqToSQL like so. public IQueryable<VictoryList> GetVictoryList() { string cacheKey = HttpContext.Current.User.Identity.Name + "victoryCacheKey"; IQueryable<VictoryList> cachednews = (IQueryable<VictoryList>)HttpCont...

SqlCacheDependecy command notification not working

I been trying to get sqlcachedependecy working, but it doesn't appear to work I got the proper settings in my web.config and also global.asa, however when I run this query and the changes are made to the database from either with in or outside the web site the cached objects are not updated please someone help? I know its not because t...

Does anyone know of anyone working on a LINQ-to-Memcached provider?

As title. I didn't find one via google, at any rate. Update: thanks for the links from the two answers; this is very useful, but not what I was after - I am curious to see whether it is possible to query an IRepository backed by memcached (or some other distributed cache), backed by a RDBMS. I've really no idea how that might work in ...

How long do you cache resources client side?

Hi, A website of mine will host the usual images, javascript and CSS stylesheets in the database. Since these are unlikely to change each day, I am going to use some client caching on these to reduce the server load. How long do you cache these? A few days? More? I'm probably not going to reuse the same name twice if I update the reso...

How to force NHibernate to recognize db changes not made through NHibernate

I am implementing NHibernate into an existing web application. However, we have some other processes that do bulk inserting and updating on the database. How can I make NHibernate aware that changes are occurring on the backend db that were not initiated through NHibernate? Most of the info that I have read around NHibernate use in asp....

Does the concept of shared sessions exist in ASP.NET?

I am working on a web application (ASP.NET) game that would consist of a single page, and on that page, there would be a game board akin to Monopoly. I am trying to determine what the best architectural approach would be. The main requirements I have identified thus far are: Up to six users share a single game state object. The users...

Is there a way to refresh the Cache in Sun Application Server 8.2

Hi, I'm trying to make updates to some static html templates running from Sun Applicaion server 8.2. When I save these updates and refresh on the client side I don't see any changes. From looking at the logs, its seems to be using the old cached page: [#|2008-10-30T17:44:01.775+0000|INFO|sun-appserver-pe8.2|javax.enterprise.system.s...

Is there a bandwidth improvement from installing a 32-bit operating system on a 64-bit machine?

Knuth recently objected to 64-bit systems, saying that for programs which fit in 4 gigs of memory, "they effectively throw away half of the cache" because the pointers are twice as big as on a 32-bit system. My question is: can this problem be avoided by installing a 32-bit operating system on a 64-bit machine? And are there any bandw...

What's the point of a cache on the swap space?

Isn't the point of caching things in main memory to avoid the expensive disk i/o? If you're caching things in the swap space of a hard drive, how does that avoid disk i/o? ...

handling lots of temporary small files

I have a web server which saves cache files and keeps them for 7 days. The file names are md5 hashes, i.e. exactly 32 hex characters long, and are being kept in a tree structure that looks like this: 00/ 00/ 00000ae9355e59a3d8a314a5470753d8 . . 00/ 01/ You get the idea. My problem is that deleting old files is taking ...

Fragment Caching with Memcached

Is there any way of using Memcached for fragment caching in Rails? ...