caching

Reset cache in Thin instances launched by Unicorn

I have a Ruby webapp that caches some frequently used information in a lightweight layer, but there are times at which I want to reset the cache without restarting the entire process. Before I started using Unicorn, I had a known list of ports that I could send a special HTTP request to reset the cache on each instance. However, under U...

Can I constrain a HashMap by the amount of memory it takes up?

I am implementing a simple cache using LinkedHashMap based on the instructions found here. I use the following code: public class Cache extends LinkedHashMap { private final int capacity; public Cache(int capacity) { super(capacity + 1, 1.1f, true); this.capacity = capacity; } protected boolean removeEldestEntry(Entr...

Django, Borg pattern, API calls, caching results

Hi everyone! I'm using an API from a different site that returns a couple of 'pricepoint URL's that my users use to buy Virtual Goods. I'm supposed to cache those results for at least an hour, since they don't change the price points on their system much. (And we want to save both our's and their bandwidth.) After looking for singleto...

Caching Pattern: What do you call (and how do you replace) OpenSymphony OsCache "group" paradigm

Hi all, A caching issue for you cache gurus. Context We have used OpenSymphony's OsCache for several years and consider moving to a better/stronger/faster/actively-developed caching product. Problem We have used OsCache's "group entry" feature and have not found it elsewhere. In short, OsCache allows you to specify one or more gro...

Invisible caching in ASP.Net MVC

I'm creating a page that has some dynamically generated images built from data that comes from web services. The image generation takes a fair amount of time due to the time involved in hitting the web services, so I need to do some caching. One option would be to use the OutputCache parameter to cache the images, but I don't like forci...

How to hold current date in cache, yet not compromise efficiency - asp.net

hi all, I am building a web application using asp.net (c#) and lingtosql. When I perform update operations on my db I update my classes. I use gridview to bind to update information. When I relay solely on the database the page's take very long to load. When I relay solely on the cache, I have old data. What workarounds do I have for ha...

How do you change the associativity of the CPU cache?

I'd like to collect data of L2 cache misses for different cache associativity settings . can anybody tell me how i could change the assocoiativity ? uSing Ubuntu on x86_64 Intel Core2 duo CPU ...

Detecting Cache Misses and Hits Pragmatically in Linux

I know this is platform-specific question, however, I would like to do some run-time analysis of an application to detect cache misses and hits. I know cachegrind, a tool for valgrind, and of vtune, and that a slew of other profiling utilities exist. However, I am interested, in implementing my own version of cache-miss detection. I k...

Drupal's Aggresive or External-mode Caching and the i18n Module

If you're not a native English speaker doing Drupal, then the i18n module is probably the only way. This is why it seems very strange to me that the performance admin page says that i18n might not work with aggressive caching or (in the case of PressFlow) external-mode caching. I find it hard to believe that multilingual drupal sites sc...

Caching custom user properties in ASP.NET MVC

I have custom UserInfo and UserAuthorization objects in my app, which determine what is displayed and what actions a user can perform on each page. At the moment this information needs to be retreived for every request to the server. Would it be possible/sensible to cache this information somehow? Can anyone suggest some good google sear...

How can I Override OutputCache from basecontroller in action?

I have a basecontroller that makes sure pages expire so the back button will display a Webpage has expired. This is done like so: [OutputCache(NoStore = true, Duration = 0, VaryByParam = "none")] However i want to have the default behavious where I can navigate back from one action on a controller that inherits from the base. It seems l...

Are there any mature distributed caching solutions available for C++ besides memcached?

Most interested in peer-to-peer solutions - without central server. So, I imagine it like a library that brings to my application a functionality of transparent cache management with feature of remote instances synchronization. It should support cache record timeout and forcing invalidation. UPDATE: If not completely peer-to-peer - at l...

Disabling S3 Cache

I have static files located on Amazon S3, and am continually having issues with Amazon caching them. When I update/overwrite the static file, I'd love for it to automatically show the newest version rather than waiting... Any ideas? ...

AWS S3 with Rails problems with caching and reloading.

I have a bit of code like so which works fine if the file in question doesn't already exist. if AWS::S3::S3Object.exists? file_name, bucket.name + path_to_images puts "file exists (deleting)" AWS::S3::S3Object.delete file_name, bucket.name + path_to_images, :force => true end AWS::S3::S3Object.store file_name, File.read(file_pa...

Why does OutputCache attribute require the VaryByParam parameter to be set?

I've done zero research on this, I'm just curious. The OutputCacheAttribute class in ASP.NET MVC requires a value for Duration and VaryByParam. I get why Duration is required, but not VaryByParam. ...

how do i create a buffer which is not cached?

i have to make a driver in linux kernel which allocates buffers and provides them to userspace via mmap. How do i ensure that these buffers aren't cached? ...

Servlet filter for browser caching?

Does anyone know how to go about coding a servlet filter that will set cache headers on a response for a given file/content type? I've got an app that serves up a lot of images, and I'd like to cut down on bandwidth for hosting it by having the browser cache the ones that don't change very often. Ideally, I'd like to be able to specify...

Is it possible to know if an image is in the iPhone system cache?

I am trying to improve scrolling performance of a UITableView. I am loading the images using imageNamed: and dispatch_async, but scrolling is very good once the images have been loaded into the cells. I would like to fade in the images only if they are not in the system cache to reduce the jarring effect of the images "popping" into view...

Google Chrome audit on caching

If I run an audit on my sites with Google Chrome, I get this message in the Leverage browser caching section: The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers: A list of all the pictures follows. I get a similar notice in Leverage proxy caching: ...

Rails memcached: Where to begin?

I read a few tutorials on getting memcached set up with Rails (2.3.5), and I'm a bit lost. Here's what I need to cache: I have user-specific settings that are stored in the db. The settings are queried in the ApplicationController meaning that a query is running per-request. I understand that Rails has built-in support for SQL cachei...