caching

jquery: for each request image load from URL, jquery not using already cached images

Hi guys i have wrote a small slideshow script and the problem is: Each time slideSwitch() function is called it loads images from server every time even when the image is cached in the browser cache. here is the code $(function() { playSlideshow = setInterval(slideSwitchTimed, 4000 ); }); function slideSwitchTimed() { $active ...

JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

Hi all, I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages: A <--> B <--> C where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I cl...

Posible to make this Code smaller?

Hello everyone I have this Two Methods private function cacheAdd($id,$data) { $this->minicache->set($id,$data); } private function cacheGet($id) { return $this->minicache->get($id); } Each time if i want to check if the items are cached i have to do something like that: public function getFriendIds() { $info = $this->cach...

Is it possible to cache web pages with a UIWebView?

I have an app that contains a UIWebView. I would like the user to be able to view webpages they've previously navigated to when off line. How should I go about making this work? Thanks! ...

Rails action caching with querystring parameters

How can I cache my REST controller with Rails where my actions have query string parameters? Example: GET /products/all.xml?max_price=200 Thx! ...

.NET Serialization and Caching question

Say I have Object A which has a member of type Object B.. and Object B has a member of type Object C. Object A VERY RARELY changes but is read very frequently, whereas Object C frequently does. It makes sense to cache Object A, but when it's serialized to go in the cache obviously is serialized the whole graph. Scenario: Object A is re...

Why doesn't the JVM cache JIT compiled code?

The canonical JVM implementation from Sun applies some pretty sophisticated optimization to bytecode to obtain near-native execution speeds after the code has been run a few times. The question is, why isn't this compiled code cached to disk for use during subsequent uses of the same function/class. As it stands, every time a program is ...

Expire content in ASP.NET MVC 1.0

Hello, I have ASP.NET MVC 1.0 application (.NET 3.5) running on II7 in 'Integrated Pipeline' mode. To cache/expire content, OutputCacheAttribute can be used to cache the action method's output. OutputCacheAttribute will send same output next time the action method is requested AND set response headers. Please tell, how do I expire cont...

Invalidating a path from the Django cache recursively

I am deleting a single path from the Django cache like this: from models import Graph from django.http import HttpRequest from django.utils.cache import get_cache_key from django.db.models.signals import post_save from django.core.cache import cache def expire_page(path): request = H...

How to cache the result of $.post-request in jQuery?

I have a small jQuery script that gets information by looking at an ID. What is the best way to prevent that the same data are requested more than once (e.g. what's the best practices for caching in jQuery)? I have tried to use $.post and $.ajax with option "cache" set to true, but the request is being sent more than once. Is it bette...

Why is cache object stored in session when using AppFabric?

I had my first go at AppFabric - caching (aka Ms Velocity) today and checked out msdn virtual labs. https://cmg.vlabcenter.com/default.aspx?moduleid=4d352091-dd7d-4f6c-815c-db2eafe608c7 There is this code sample in it that I dont get. It creates a cache object and stores it in session state. The documentation just says: We need to...

What are the ways to get a handle on the view amidst recycling?

I have a GridView, in my activity, that displays about 30 thumbnails fetched from a remote server. I am doing 2-level caching for the images: there is an in-memory cache(HashMap using softReferences) Secondly, all the images fetched are written to Sdcard(so as to avoid refetches when in-memory bitmaps are GC'd). From the getView of...

Answering HTTP_IF_MODIFIED_SINCE and HTTP_IF_NONE_MATCH in PHP

I have cacheable dynamic content made in PHP 5.1.0+. I already send the correct headers (including Last-Modified and ETag) to clients. I now want my script to be able to answer $_SERVER['HTTP_IF_MODIFIED_SINCE'] and $_SERVER['HTTP_IF_NONE_MATCH'] when present. When the conditions matches, I want to answer a HTTP 304 "Not Modified" to cl...

Mapping Handler to Static Extension

What are some unintended consequences associated with mapping an ASP.NET HTTP Handler to a static extension like *.css? <add verb="*" path="handler.css" type="Web.HttpHandler.ThemeCssHandler" /> By default, *.css is registered as static content in applicationHost (under IIS7): <staticContent lockAttributes="isDocFooterFileName"> ...

SQL Server cache question.

When I run a certain stored procedure for the first time it takes about 2 minutes to finish. When I run it for the second time it finished in about 15 seconds. I'm assuming that this is because everything is cached after the first run. Is it possible for me to "warm the cache" before I run this procedure for the first time? Is the ca...

When To Refresh/Replace Cache in RSS Reader

For a simple rss reader, I am storing the results of queries in a client side (google gears) database. So, myapp.php?query=xyz is stored in one column, and the result xml is stored in the next column. Then, when myapp.php?query=xyz is requested, I first attempt to load from the cached content in the second column. I need to figure ...

Changing Duration for Cache Item Expiration Callback?

Omar Alzabir Wrote In His Article: " the minimum duration you can set for expire callback is 2 minutes. Although you can set a lower value, it does not work. Most probably the ASP.NET worker process looks at the cache items once every two minutes." I tested it. the duration of delegate function callback was ...

Can GWT be configured to create cache files in other location than the user's home folder?

I have a large project which I am compiling with GWT. During this process GWT generates some cache files in C:\Documents and Settings\[UserDir]\Local Settings\Temp\. For example: gwt60627byte-cache (86,321 KB) gwt60628byte-cache (4,445 KB) gwt60629byte-cache (53,773 KB) gwt60696byte-cache (8,111 KB) gwt60697byte-cache (572,777 KB) I k...

C# Caching in BLL

I am trying to implement caching in an web application. The caching is to be done in the BLL. The BLL method signiture is public static List<Ailias> Select(List<Filter> filters) and at the moment simply calls the corresponding method in the DAL. The issue I'm having is my cache dependancy will be the filters object, whenever the fi...

Ehcache Statistics by key

Hello all! I am interested in getting statistics on the Ehcache I have running. I would like to see the number of hits/misses for a given key over a period of time. Perhaps in the form of a map. For example. For the passed hour (or however long it has been running) Key A had 30 hits and 2 misses Key B had 400 hits and 100 misses...