caching

Java max file caching solution

Hi, I'm trying to write many files to a directory, and when the directory reaches X number of files, I want the least recently accessed file to be deleted before writing the new file. I don't really want to roll my own solution to this because I'd imagine someone else has already done this before. Are there existing solutions to this? N...

Overcome non-cacheability of pages on Firefox

I'm trying to build an extension to Firefox to get a page from a web server and put it in the browser's cache, so that when the user asks for that link, it'll be retrieved directly from the cache, instead of asking to the original web server. But I'm having trouble with some pages which put headers to avoid cacheability, such as "Cache-...

Thread Safe Object Pool with Guarantee of Returning Existing Object if Strong References Exist?

I'm trying to extend the Clojure language to extend ACI-guaranteed refs to ACID-guaranteed drefs (durable refs). The API is to simply to call (dref key value), where key is a String of the key to be used in the underlying data store (BDB JE in my current implementation), and value is the Object that the dref should be initialized to. I...

What is the best way to release sprite frames used in an animation?

Hi, I am creating an animation in a scene(the current level) and so in the init section I add the required frames into the spriteFrameCache. [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"OchoHit.plist"]; CCSpriteSheet *spriteSheet1 = [CCSpriteSheet spriteSheetWithFile:@"OchoHit.png"]; [self addChild:sprit...

How to keep long running NHibernate Session data consistent?

I have NHibernate sessions cached in the ASP.NET session. I came across a situation where a user edited an object so it's in their first level cache in the ISession. Another user then edited the same object. At this point User1 still sees their original version of their edits where as User2 sees the correct state of the object? What i...

Using the pagefile for caching?

I have to deal with a huge amount of data that usually doesn't fit into main memory. The way I access this data has high locality, so caching parts of it in memory looks like a good option. Is it feasible to just malloc() a huge array, and let the operating system figure out which bits to page out and which bits to keep? ...

spring mvc 3.0 caching

hi, I'm using spring mvc 3.0 with eclipselink and jpa and I'm experiencing following issue: I have this field in my app: @OneToMany(mappedBy = "stadium") private Set<FootballMatch> footballMatches = new HashSet<FootballMatch>(); when there is triggered some action that adds new items into set via Set.add(), the changes doesn't show up...

AppFabric Caching - Can I specify serialization style used for all objects?

An object which implements some custom serialization can be serialized and deserialized to different formats, for example to Xml or byte[]. I have run into a problem where when I put to cache, AppFabric runs the IXmlSerializable implementation on a class when I would rather force it to go with binary. http://stackoverflow.com/question...

Character case in HTML tags

What's the rule for character casing in html tags? I have a situation where I need to force no caching on a site of mine. I have been using all lower case for all html tags and attributes (being under the impression that it's case insensitive). I haven't had any issued from this, until now. I have found that the following works on IE7:...

locking on a cache key

I've read several questions similar to this, but none of the answers provide ideas of how to clean up memory while still maintaining lock integrity. I'm estimating the number of key-value pairs at a given time to be in the tens of thousands, but the number of key-value pairs over the lifespan of the data structure is virtually infinite ...

Scroll view and table view performance when loading images from disk

I'm trying to improve the performance of my image-intensive iPhone app by using a disk-based image cache instead of going over the network. I've modeled my image cache after SDImageCache (http://github.com/rs/SDWebImage/blob/master/SDImageCache.m), and is pretty much the same but without asynchronous cache in/out operations. I have some...

When iterating cache files using WinInet's methods, how can I skip large files?

A part of my program uses WinInet's caching function (e.g. FindFirstUrlCacheEntry, FindNextUrlCacheEntry) to go through the system cache and delete files that meet certain criteria. The problem is that when a large file is found in the cache, FindNextUrlCacheEntry fails with ERROR_INSUFFICIENT_BUFFER, and requests an unreasonable buffer...

Optimal Storing of Cache File References with Cache Tags in MySQL

Background I've got a complex page caching system in place. Every database item that is used on a page stores a reference related to the item and the cached page. Below is the database table used to store those cached references CREATE TABLE `sacrifice_cache` ( `cache_id` int(21) NOT NULL AUTO_INCREMENT, `cache_page_id` varchar(255...

iOs and offline caching

I have created a 'working' manifest file. I am aware that what I am caching is over the 5mb limit that is allowed. My cache appears to loaded at random, I had expected it to load in order of how it is listed, however this isn't the case. Take the below example CACHE MANIFEST images/img1.png images/img2.png images/img3.png images/img4...

Caching for poll?

I'm building a poll widget using ASP.NET controls and Linq-to-Sql for a high traffic site. The widget is, actually, already built. But, it does not use caching yet. This poll can work in a multi-poll mode which means that each page load the control will hit the database to find any polls that the current user has not taken. There are al...

IIS6 Cache - how to save cache state for the maximum possible time

Hello, I'm facing some performance problems with IIS6, and so I want to store things in cache for the maximum possible time so that when new requests arrive the content is already available in cache. Can anyone give me a hint how can I do this? ...

creating a drupal non-cached template variable

In drupal 6 I'm trying to execute a function on every page and output a different link based on what IP address someone is coming from. However, when I try this, it seems that the result is getting cached. I have tried this as a module and in template.php, but have not gotten results. What is the best approach to make sure this function ...

If you are using Apache ZooKeeper, what do you use it for?

Is someone out there who is using ZooKeeper for their sites? If you do, what do you use it for? i just want to see real word use case? ...

Launching and database of png images - iPhone

Hello everyone! So, I'm actually making an iPhone app with a big library of guitar chords and scales. The scales are logical, so they are successfully draw by following musical theory. On the other hand, I have a library of 4500 small png files (3ko) for the guitar chords. My problem is that even if it's not used for the launch (but f...

Howto: Javascript files always up-to-date

I have a .NET web applications which uses a lot of javascript. The .aspx and the .js files go hand-in-hand together. Problem: The .aspx files are always up-to-date on the client (not cached) but the .js files might well be cached. This is even a problem if the files are only cached for one session since users are spending many hours on ...