caching

Hibernate Second level Cache <<net.sf.ehcache.hibernate.EhCacheProvider>>

Hi every one, I want use second level cache in my hibernate Project but I just know a little about hibernate second level cache, can any one explain how shoud I use this in my code and what configuration and .jar file I need? I set these setting to my hibernate.cfg.xml file <property name="hibernate.cache.use_query_cache">true</propert...

If an externally included file (e.g. JavaScript or CSS) is included twice (or more) on a page will there be two (or more) web requests?

Let's say because of a conditional comment or just being careless the same included file is present for users of some browser or even all browsers. For example: <!--[if lte IE 8]> <script src="mygreatincludefile.js" type="text/javascript"></script> <![endif]--> <!--[if lte IE 6]> <script src="mygreatincludefile.js" type="text...

Action Cache for root URL not working

Here's the setup. I have web site which is essentially a simple CMS. Here is the routes file: map.connect ':url', :controller => :pages, :action => :show map.root :controller => :pages, :action => :show, :url => "/" The page controller is thus: class PagesController < ApplicationController before_filter :verify_access, :except =>...

Using CacheListener with GAE

I store instances of Domain objects in GAE's memcache using the javax.cache API. I'd like to be notified as soon any instance is evicted due to storage limitations or anything else. Is a CacheListener the solution for that? Is GAE calling CacheListener.evict(Object o) when it's removing instance? ...

Caching linked pages in ASP.NET

I'm thinking of a way of creating a local backup for the pages I will be linking to from my site. This would be text-only, similar to Google's 'Copy' feature on the search pages. The idea is to be sure that the pages I would reference to, or cite from, do not dissapear from the Web in the near future. I know I could just keep local copie...

Cache all models in a table

I need to cache (and expire) all the models in a table. For example, if i have a model named Currency, i only have less than 10 possible currencies. Therefore, it would be nice to have: class Currency < ActiveRecord::Base cache_all(:expire_in => 10.minutes) end so that Currency.all Currency.find_by_name("USD") should not hit the...

If Flash downloads a file, is it cached?

Does Flash use the browser cache when plugin content downloads files? ...

Best practices regarding caching in ASP.NET apps

I have a question regarding Caching. I have a typical n-tier ASP.NET web app. I have made a custom Cache wrapper (wrapping ASP.NET Cache object), and I would like to know the best practices of Caching data. I don't want to use caching in my business layer (don't want to add any reference to System.Web dll there). Same case with DAL. So t...

Page cache in PHP that handles concurrency?

I've read previous answers here about caching in PHP, and the articles they link to. I've checked out the oft-recommended Pear Cache_Light, QuickCache, and WordPress Super Cache. (Sorry - apparently I'm allowed to hyperlink only once.) Either none deal with concurrency issues, or none explicitly call out that they do in their document...

Question about LRU Cache implementation in Java

The standard example for implementing LRU Cache in Java points to the example depot url http://www.exampledepot.com/egs/java.util/coll_Cache.html How is removeEldestEntry called by default after just adding a new entry in the code snippet below? final int MAX_ENTRIES = 100; Map cache = new LinkedHashMap(MAX_ENTRIES+1, .75F, true) { ...

How do I empty Drupal Cache (without Devel)

Okay... Seems i can't find it with google... so here you go SO ;) How do i empty the drupal caches: without the Devel module without running some PHP Statement in a new node etc. without going into the database itself Effectively, how do you instruct a luser to clear his caches ...

Can't the browser just use its cache from prior ajax calls?

I am trying to rely upon the browser cache to hold JSON data returned from AJAX calls in jQuery. Normal browser activity relies upon the browser cache all the time. Example: jpg and gif images are not refetched on a page reload. But when I try using jQuery getJSON ajax calls, I cannot seem to avoid fetching the data from the server. M...

SharePoint: CSS changes update in FireFox but not IE

Weird problem. I update the site CSS sheet and the changes show straight away in FireFox but don't show in IE. Using the Developer Toolbar in both apps the style changes are missing in IE. I've reset the browser cache but no dice. ...

Is it worth mitigating against the effects of garbage collection?

I have an application where the memory profile looks something like this: The slow upwards crawl of memory usage is caused by the allocation of lots and lots of small, simple, transient objects. In low-memory situations (This is a mobile app) the GC overhead is noticeable when compared to less restrictive memory amounts. Since we kno...

Efficeintly maintaining a cache of distinct items in a huge DB table

I have a very large (millions of rows) SQL table which represents name-value pairs (one columns for a name of a property, the other for it's value). On my ASP.NET web application I have to populate a control with the distinct values available in the name column. This set of values is usually not bigger than 100. Most likely around 20. Ru...

I've got a django site with a good deal of javascript but my clients have terrible connectivity - how to optimize?

We're hosting a django service for some clients using really really poor and intermittent connectivity. Satellite and GPRS connectivity in parts of Africa that haven't benefited from the recent fiber cables making landfall. I've consolidated the javascripts and used minificatied versions, tried to clean up the stylesheets, and what not...

javascript cannot be cached?

Just curious on this, is it possible to cache javascript? That is, to minimize client cpu needed to recalculate some logic each time I refresh the browser? Take the google javascript map for example. When I emebed the map on my page, is there any cache mechanism that I can use on my page? ...

Modifying the HTTP headers client-side with JavaScript

Is it possible to use JavaScript to dynamically change the HTTP Headers received when loading an image from an external source? I'm trying to control the caching of the image (Expires, Max-Age, etc...) client-side since I do not have access to the server. ...

Article about jquery library hosted on Google not actually caching...

...re-downloads even if it was in cache. I think it had some statistics regarding the number of Yahoo users for which items had to re-download even if it was in their cache (60%?)... Read it earlier this year, but could be from last year too. I believe the page had lots of yellow on it too. Has anyone seen (bookmarked? wrote?) this a...

C# generic cache with type safe

Hello, I'm looking for a way to have a generic local cache for any object. Here is the code : private static readonly Dictionary<Type,Dictionary<string,object>> _cache = new Dictionary<Type, Dictionary<string, object>>(); //The generic parameter allow null values to be cached private static void AddToCache<T>(stri...