caching

Reuse/cache datatable in a web service

I have a web application that pulls a datatable and displays results. Due to the nature of the business all of the business rules are incorporated in dlls that the web app must pull from. Because there are multiple site and we don't want to include the core dll's in all of the many apps that are deployed we consolidate any calls to the c...

undefined method 'cache_sweeper'

I'm trying to setup some caching on my site and am having troubles with getting a cache sweeper working. I followed the Railscast but when I try to load a page with the model, I'm getting an error. Here's what I've done thus far: 1.) Added the app/sweepers directory and put a basic sweeper in it: class TeamMemberSweeper < ActionControl...

Is it possible to prevent an NSURLRequest from caching data or remove cached data following a request?

Hiya, On iPhone, I perform a HTTP request using NSURLRequest for a chunk of data. Object allocation spikes and I assign the data accordingly. When I finish with the data, I free it up accordingly - however instruments doesn't show any data to have been freed! My theory is that by default HTTP requests are cached, however - I don't want...

Reference counting in PHP

I'd like to implement database caching functionality in PHP based on reference counts. For example, code to access the record in table foo with an ID of 1 might look like: $fooRecord = $fooTable->getRecord(1); The first time this is called, $fooTable fetches the appropriate record from the database, stores it in an internal cache, an...

Disk backed dictionary/cache for c#

I'm looking for a drop in solution for caching large-ish amounts of data. related questions but for different languages: Python Disk-Based Dictionary Disk-backed STL container classes? Close question in different terms: Looking for a simple standalone persistant dictionary implementation in C# I don't need (or want to pay anythi...

How do I optimize this export feature for LAMP web app?

Hi guys & ladies, I have a feature which allows the user to create projects and view it on this page. They could import resources(pdf,img,etc) to be kept along with their projects. So now i want to create a feature which allows the user to export all their stuff and those people who are in the same group as them all neatly with pretty r...

Caching database data in Session - getting the balance right

If you cache data from your database in ASP.NET Session then you will speed up subsequent requests for that data (note: depending on the serialization/deserialization cost of the data concerned), at the expense of memory load in IIS. (OK, this is probably a simplification of the reality of the situaiton - feel free to correct or refine ...

Efficiency of persistence methods for large asp.net cache store

Curious if anyone has opinions on which method would be better suited for asp.net caching. Option one, have fewer items in the cache which are more complex, or many items which are less complex. For sake of discussion lets imagine my site has SalesPerson and Customer objects. These are pretty simple classes but I don’t want to be chatty...

How do I make Tomcat stop caching my servlet responses?

I'm learning Servlets programming, using Apache Tomcat 6 on a Ubuntu 8.10 machine, and I'm running with a very annoying issue -- apparently, related to caching. This is what I'm doing: I write a servlet, put it in a nice directory structure and deploy it using the Tomcat Web Application Manager. It works as expected. Then I edit the ser...

What's a good caching reverse proxy which can serve stale content if the underlying application becomes unavailable?

I'm looking for a caching reverse proxy (something like squid or varnish) with good support for serving stale content in the event of failure - in other words, if the application I'm proxying goes away or starts serving internal server errors I'd like the cache to continue to serve the last good response saved from the back end. Essentia...

Cache or class variables?

Is it better practice to use class variables, or the session cache in ASP.NET? I have a variable which I need to persist across page loads. Is it better to use: public class MyClass { private SomeObject anObject; private method1() { anObject = new SomeObject(); } private method2() { // do something with anObject } } ...

Does location.replace() not do a conditional get if last-modified caching is in place?

Here's what I'm seeing: I have a conditional-get caching policy in place (cache-control: private, must-revalidate). It works fine if I'm on the page, then try to hit the browser's refresh button. However, in another part of my site, I use location.replace(url) to go to that page... if I do that, its not makign that check and always ret...

ASP.NET: WCF and Could not load file or assembly 'App_Web_hamznvwf

I have recently begun working with AJAX-Enabled WCF, and have been plagued with this .NET caching issue - Could not load file or assembly App__Web__hamznvwf I was having issues with this 4 to 5 times a day on my server (Win 2003) - see first post So I moved my files off of the server and started running the project locally (Win XP). Ar...

What are your thoughts on this article about ViewState v.s Cache?

I was looking at this article from 2005 and wanted to get some thoughts on it, advantages and disadvantages that the article does not point out about ViewState and Cache? http://www.codersource.net/asp_net_viewstate_versus_data_caching.aspx ...

Cache v.s Session

What is the difference between storing a datatable in Session v.s Cache? Advantages and Disadvantages? So if it is a simple search page which returns results in a datatable and binds to a gridview. If user a searches and user b searches, is it better to store it in Session since each user would most likely have different results or ca...

Does the Cache get overwritten?

If yo have multiple users on your website on the same page and they are running queries (searches) and the results are stored in a datatable. Will the last person's search overwrite the application Cache if you store it in the Cache? Is this a reason to use Session? ...

I'm confused about HTTP caching.

I've been thinking about batch reads and writes in a RESTful environment, and I think I've come to the realization that I have broader questions about HTTP caching. (Below I use commas (",") to delimit multiple record IDs, but that detail is not particular to the discussion.) I started with this problem: 1. Single GET invalidated by b...

Is there is a software caching API out there?

Hi all, I'm looking for an API or an application that can cache data from a file or database. My idea is that I have an application that reads a database, but the access to database is sequential and it is on a disk. What I basically want to do is get the data from cache first and then if it doesn't exist in cache, then hit the databas...

What does "subrange" mean in the HTTP spec?

See, for example, §13.3.3 and §13.3.4. It doesn't seem to me that this could be related to "media range" (§14.1, e.g. Accept: text/*), nor "language range" (§14.4, e.g. Accept-Language: da, en-gb;q=0.8, en;q=0.7). Maybe it's the "accept range" (§14.5), which puts byte limitations on a response? If that's true, how do ETags relate? ...

What is a Warm-Up Cache?

Hello, I am working with some multicore simulatores such as, GEMS or M5. And in all of them there is an option for Warm Up the cache. Can anyone please tell what does that term mean?. ...