caching

Design code to fit in CPU Cache?

When writing simulations my buddy says he likes to try to write the program small enough to fit into cache. Does this have any real meaning? I understand that cache is faster than RAM and the main memory. Is it possible to specify that you want the program to run from cache or at least load the variables into cache? We are writing si...

ASP.Net HttpContext Cache-- why do I read Null when someone else says ""?

I have a coworker who's written the following line in the page load method in an aspx page: myDataSet = (DataSet)HttpContext.Current.Cache["dataset"]; The first time I hit the page HttpContext.Current.Cache["dataset"] reads null. When he does it, the value is "" (string.Empty) and he gets a cast exception. We're both running ASP.Net...

understanding hibernate first level cache

session.open insertIntoTODB() getList() session.close session.open() getList(); sesson.close() 1st leve cache is only bounded in session open and close and for 2nd subsequent session open, getList() will get from DB instead of cache? ...

2nd level hibernate cache understanding

1.for 2nd level cache, can only set timeout period but cannot force refresh/clear cache of entity? or putthing annotation @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) like auto refresh/clear the cache each time doing saveorupdate/mergeupdate? what is hibernateTemplate.flush() relate to this? 2. is it good to enable 2n...

Flash image rotator - does it cache xml?

I'm planning to use flash image rotator based on xml where are defined paths from all images that will be rotated. What I wanted to do is to use this rotator for random images rotating. Each time page is refreshed new xml file is created (existing one is replaced with new one). Well, I was thinking and came to this: - user A visits page,...

Client cache validating when content is still fresh (Apache, Firefox, PHP)

I have a site with a rotatory banner, and there is a JavaScript that implements the rotation. I have instructed Apache to return Expires header for all images for a time in the future (maybe 12 hrs) something it is doing every time. The problem is Firefox (and the others I assume) is asking Apache for the validity of the image every time...

WCF ChannelFactory and Channel caching in ASP.NET client application

Hi All, I´m building a series of WCF Services that are going to be used by more than one application. Because of that I´m trying to define a common library to access WCF services. Knowing that each service request made by different users should use a different Channel I´m thinking in cache the Channel per-request (HttpContext.Current.I...

Caching dynamic images in Rails

I am using the rmagick gem for generating dynamic images from a controller. The controller takes an id as a param, does a look up on a model, writes text over an existing image, and outputs it. I have run some benchmarks comparing generating it for every request versus writing to disk and using send_data to output it if it already exist...

Is there something like asynchronous caching with ehcache and springmodules?

Is it possible to have cached queries asynchronous, so that no frontend user actually has to wait for a heavy query to finish? (I.e. heavy query is running as background thread, while (expired) data is delivered from cache. Use case: A web page displaying data, needing some time (too long to wait for when requesting a page) to be collec...

How to reduce the total memory hogging by compacting my Objects in Java?

I have a table with around 20 columns with mostly consisting of varchars and decimals. This table has almost 1.5M rows. But few things are common in them like column1 consists of only 100 distinct strings , column2 has almost 1000 and column3 has almost 500. Right now, I am storing all these column values in a map with Key as first 5 c...

Javascript caching question

I'm making an application that draws a lot of widgets and tiles on a canvas. The core UI will be defined by a long string of characters and drawn at page load by javascript. Since that core UI is big, >250K, and never changes, whats a good way to cache that? I know I COULD just stick it in a variable at the top of the file, but is there...

NSString Caching Problem

Hello, i have got a Problem with Caching data. My last Post was closed, because i have made something wrong. (Dont know yet,..but does not matter) I get Content with InitwithContentURL,and i receive this String every 10 Seconds, but often it loads something, which looks like "caching". This is the function: NSURL *xmlURL=[NSURL URLWit...

Dot net 3.5:is appconfig dynamically updated in cache on run time?

After application start up ,if i change some value in app.config ,is it reflected in cache object through which i access appconfig properties. string currentValue = ConfigurationSettings.AppSettings[currentKey]; If it is not so what is possible way to do so? ...

Cache java compilation

Is there any posibility to cache java compilation like ccache does for C or C++ compilation? I have a lot code to compile, and I compile the same code many times, so it took a lot of time. So I thought to cached it to speed up. ...

Tool for monitoring Hibernate cache usage

Is there any tool which would allow for monitoring Hibernate 2nd level cache usage? I know that I could use Hibernate API for retrieving such information. But what should I do when I have application which doesn't read the information itself, and I can't modify it? Is there any way to read cache statistics from the outside of the applica...

Caching in a clustered environment

Caching your data in your application code is generally a good idea for many reasons. We have being doing this for quiet some time in our shared environment which includes ColdFusion, .NET, and PHP. However, because we share this environment with many other development groups in our organization, there is significantly more downtime then...

How to Cache images in asp.net

What is the best approach to caching images in asp.net? ...

Caching data by using hidden divs

I'm trying to speed up response times in my ajax web application by doing the following: Say the user requests a page whose contents don't change (e.g a web form). When the user makes a different request, I 'cache' the form by putting it in a hidden div. Before displaying the new information. So the form is basically still loaded in th...

How to implement a cache with binary array as key and binary arrays as values in Java

I have a requirement to create a java cache which holds all the cities and airports. So, if i query the cache for a location, lets say a city, it should return all the airports in that city and if I query a location which is an airport, i should get back that airport. Also, each location has to be stored as a byte array in cache.(as the...

Maintaining a Caching Appliance

What are typical cache appliance maintenance tasks and schedule for same? ...