caching

Why does Django give me different results for the same query?

For a mock web service I wrote a little Django app, that serves as a web API, which my android application queries. When I make requests tp the API, I am also able to hand over an offset and limit to only have the really necessary data transmitted. Anyway, I ran into the problem, that Django gives me different results for the same query ...

How can I prefetch a memory region most easily?

Background: I've implemented a stochastic algorithm that requires random ordering for best convergence. Doing so obviously destroys memory locality, however. I've found that by prefetching the next iteration's data, the performance drop is minimized. I can prefetch n cache lines using _mm_prefetch in a simple, mostly OS+compiler-porta...

HTML5 App Cache not working with POST requests

Hello, I'm working on a web application and I went through the necessary steps to enable HTML5 App Cache for my initial login page. My goal is to cache all the images, css and js to improve the performance while online browsing, i'm not planning on offline browsing. My initial page consist of a login form with only one input tag for en...

Safari caches JSONP requests locally

I have a page that makes the same JSONP request multiple times in a single page load. In most browsers this works fine, but Safari caches the response locally until such time as the page is reloaded. Even when I send back a Cache-Control: no-cache header on the response. consider the following example code: var plcbCnt = 0; var plcb ...

Optimize read/write speed of a single file via caching (Mac OSX 10.4)

My bookmarks.html file is 40 MB in size. Anytime I edit a bookmark in Bookmark Manager (Firefox), I find myself waiting 10-20 seconds for the operation to complete. (Looking at the Activity Monitor, I can see there is a lot of disk activity). Q: How can I tell my OS to specifically cache the file "bookmarks.html" (so that read/write o...

Django Performance

I am using a django with apache mod_wsgi, my site has dynamic data on every page and all of the media (css, images, js) is stored on amazon S3 buckets liked via "http://bucket.domain.com/images/*.jpg" inside the markup . . . . my question is, can varnish still help me speed up my web server? I am trying to knock down all the stumbling b...

hibernate getResultList() returns varying data

Hi, I am working with JPA (1.0 or 2.) + hibernate (3.4.0 or 3.6.0) and I have run into a problem with I think caching somewhere. What I do: Find an object with my JPA class (row in the database with a particular id) update a boolean flag on the object (tinyint field in the database) persist the object grab the entire table from the ...

Rails 3 Layout + Querystring Problem

I'm trying to setup an ajax-based website that loads a fragment of a webpage when a specific combination of GET variables and HTTP Headers are given. GET /normal/html/page?ajax=true X-ajax: true What I've setup in my controller is: before_filter do |controller| if request_by_ajax? ApplicationController.layout false end end ...

Caching static files in Django

I was profiling the performance of my web application using Google's Page Speed plugin for Firebug and one of the things it says is that I should 'leverage caching' — "The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources". When I dug deeper I ...

Random stylesheet caching in Google Chrome

Hey, So as in the title, my stylesheets keep on caching for no apparent reason. It is only today I have started testing my VB.Net website in IE8 and using jQuery on the customer front end, and it is only the past 30 - 45 minutes that I have noticed this happening. There was one background-color which I changed a few minutes ago with no...

Django i18n internationalization and memcached

I'm trying to set up memcached on a django project on which I'm using the i18n internationalization system. Sadly, it looks that memcached is not caching different versions of the same page according to the language. In facts, when I switch language, it gets the previous cached page, without caring about the language switch. I'm using...

How to check which cache features are turned on? [PHP/MYSQL]

Is there an application or a code I can use to check which cache functions are turned on? On this app I'm working on, I thought there was mysql cacheing, but since I started using the SELECT SQL_NO_CACHE in one of my queries (applied yesterday), the cacheing has not stopped. This leads me to assume it's a php cache function that's occ...

MemoryError hook in Python?

Is there a way to globally trap MemoryError exceptions so that a library can clear out caches instead of letting a MemoryError be seen by user code? I'm developing a memory caching library in Python that stores very large objects, to the point where it's common for users to want to use all available RAM to simplify their scripts and/or ...

Is it possible to make ASP.NET WebMethod CacheDuration configurable?

I'm using the following attribute on a web method in a web service: [WebMethod(CacheDuration = 60)] Is it possible to make the CacheDuration value of 60 configurable from a web.config setting? Or is there another was to set CacheDuration not using an attribute? ...

Find direct video.google.com url of a youtube video

Some youtube videos server by google cache servers and others by youtube cache servers. I want to find the direct url of a youtube video which server by google servers. For example the direct url for youtube video(id=Q_6qRyYn-68) is http://r7.fra07s04.googlevideo.com/videoplayback?ip=78.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%...

Android Simple MediaPlayer problem

Hi All! Can someone please point to me what is wrong with my code? try{ MediaPlayer p = new MediaPlayer(); p.setDataSource(getCacheDir() + "/temp.mp3"); p.prepare(); p.start(); }catch(Exception e){} MediaPlayer p catches Exception whenever it calls prepare(). File temp.mp3 is already inside the cache folder and it is not corrupt or ...

Caching an entire web page on the iPhone

I am considering caching an entire web page locally on the iphone, i.e. I want to provide a url and have the device download all the assets automatically. ASIHTTPRequest offers a cache, but as far as I understand it will only cache whatever url you feed it. I wonder if anyone has implemented a caching mechanism that will parse the downl...

Problem to find all cache keys our memory by using Memcached

Hi Friends, I am using Memcached for implementing distributed cache. The Library that i used for it is Enyim.Caching. With the help of its great documents I've furnished all my requirements. But i am not be able to find all cache key in the memory. With the help of System.Web.Caching i am doing for the same requirement as. #region ...

Saving a web page and externally linked assets as an independent static resource

Hi All, We have a requirement to cache web pages as accurately as possible, so that we can go back and view a version of a page at any previous point in time. We'd like to be able to view the page as it really was - with the right css, javascript, images etc. Are there any OS libraries (any language) that will fetch a page, download al...

Means of caching in GWT

What is the best way of caching things in GWT. Data retrieved from RPC calls. I am interested in Data Structures and frameworks available out there, like ehcache. I am using gxt and have been storing things in the FastMap. What is the load capacity for the FastMap, is this the best way to do things. I know it eventually compiles to jav...