caching

Help create a unit test for test response header, specifically Cache-Control, in determining if caching has been disable or not...

Scenario: I have a base controller which disables caching within the OnActionExecuting override. protected override void OnActionExecuting(ActionExecutingContext filterContext) { filterContext.HttpContext.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); filterContext.HttpContext.Response.Cache.SetValidUntilExpires(false)...

jquery ajax php recordset caching

Hi, I currently have a jQuery/ajax request which produces a recordset which appears in #contentDiv on my page. The user can then browse the results and view further details of an item. Once on the page for the item it the user hits back on their browser they return to the default page for my search without their generated search resul...

How long are Google Static Map custom markers cached for?

How long are Google Static Map custom markers cached for? ...

WCF Runtime Caching

Hi I'm using the following code to cache objects. HttpRuntime.Cache.Insert("Doc001", _document); HttpRuntime.Cache.Remove("Doc001"); I would like to know were the cache is stored? (On the client PC or the IIS server) Is this a save way of cache objects and by adding and removing cache in this way will it influence any of the other cli...

What's wrong in this caching function in Django?

I've created the model for counting the number of views of my page: class RequestCounter(models.Model): count = models.IntegerField(default=0) def __unicode__(self): return str(self.count) For incrementing the counter I use: def inc_counter(): counter = RequestCounter.objects.get_or_create(id =1)[0] counter.co...

Why would java give different DNS results with IPv4Stack

I have the following code: import java.net.InetAddress; public class lookup { public static void main(String[] args) throws Exception { for(String host : args){ for(InetAddress addr : InetAddress.getAllByName(host)){ System.out.println(addr.getHostAddress()); } } } } We recently changed the CNAME for a host w...

How to enable Function Result Cache

I'm trying to use Oracle's Function Result Cache on 11.2.0, so I did the following test: CREATE OR REPLACE FUNCTION get_test_value RETURN NUMBER RESULT_CACHE AS BEGIN dbms_output.put_line( 'Called' ); RETURN 0; END; SELECT get_test_value FROM dual; My example prints Called every time, though.I also tried some other examples f...

Can I Use MemcacheDB to Replace Memcached in django?

I want to use MemcacheDB instead of Memcached because I don't have a lot of RAM for Memcached. Will it work with django's cache framework? Is there anything additional I would need to do? ...

Accessing array from multiple threads

Let's say I have two arrays: int[] array1 = new int[2000000]; int[] array2 = new int[2000000]; I stick some values into the arrays and then want to add the contents of array2 to array1 like so: for(int i = 0; i < 2000000; ++i) array1[i] += array2[i]; Now, let's say I want to make processing faster on a multi-processor machine, so i...

Timed Page Caching in Rails

In a project I'm working on, I'm requesting data from an external API in my controller, which is then displayed in the view. I've recently begun running into exceptions being thrown due to rate limits, which are caused from excessive calls to the API. To fix this, I'm assuming that I need to implement some sort of caching system. I've be...

Rails 2.3 caching by time

Hi guy, I would like to cache my fragment page in my rails application by time. I found this plugin to do this => ici but any download is available. I searched in the rails doc but I don't found how to cache my fragment by time. Are you know another plugin to do this or another method to do this ? Thanks. ...

what is the easiest way for opcode caching with PHP/Apache ?

I was thinking to use opcode caching for performance profit what is the easiest way for opcode caching with PHP/Apache ? and what are the performance improvements ? I have read about xDebug but I was wondering if there are more options ? ...

SQL caching strategy

I'm working on an interactive contact search page (contacts are returned via ajax as you type or select criteria). I want this page to be very responsive. There is a complex set of rules to determine which contact records a given contact can see; these rules are rolled up into a user-defined function, DirectoryContactsByContact(@Contac...

Can NHibernate tell me which properties of an object have changed?

Is it possible to find out what has changed when an object has been updated in Nhibernate? Thanks. ...

ASP.NET CacheDependency out of ThreadPool

In an async http handler, we add items to the ASP.NET cache, with dependencies on some files. If the async method executes on a thread from the ThreadPool, all is fine: AsyncResult result = new AsyncResult(context, cb, extraData); ThreadPool.QueueUserWorkItem(new WaitCallBack(DoProcessRequest), result); But as soon as we try to execut...

Strange IIS Caching Behavior with Resx files

I'm having some strange problems with a site using .net 2.0 and IIS 6. The site uses resx files so it's localized in many languages. In some of those files we make changes to the resx and recompile, and the changes don't show up on the site. Ever. It's primarily in one language (Arabic) that this happens, but occasionally other languages...

PHP: caching pages with state

I would like to utilize caching on a couple pages: individual blog pages index.php However, after devising my system, I realized that the headers of my pages change according to state very slightly (aka, it says something like "Hello, [email protected]" if you are signed in). I therefore want to make sure that it doesn't accidental...

Is it worth having static resources in a separate domain/server?

I am currently in the process of improving my grails website performance and following many best practices I found on the internet, I currently need to make a decision between two solutions before refactoring my code Solution 1 : Export all of my static resources (js, css, images) to a separate domain and server (as already done by SO ...

Using system cache of UIImage objects with images loaded from disk cache (NSCachesDirectory)?

Hi, I'm trying to improve scrolling performance on a UITableView that uses cells with images fetched from the web, but stored in the NSCachesDirectory. The cells have a custom content view to draw the contents (an image). When I use a placeholder image from the app bundle, using [UIImage imageNamed:@"Placeholder.png"], scrolling perfor...

Implementing parallel static content download in the browser?

We are looking at adjusting our web pages so we split our calls for static data across sub-domains. In order to do this we must: Always serve the same content from the same sub-domain so it remains cached Try and serve roughly the same amount of content from each of the sub-domains Try to do this in an automatic way on a per-page basis...