caching

subsonic with support for caching

Having a project with following requirements in mind. data reading intensive application. 100 max concurrent users a times. Application have very high Though data is huge it is getting modified only once a day Decided to use subsonic cause of ease of development and potential to work in high traffic environment. Though few things ...

How do I get around the Twitter API caching problem?

I'm building a Twitter app that requires to check user data somewhat frequently, but I'm facing trouble with a cache that's oddly on Twitter's side, not mine. Try the following user: users/show in XML: http://twitter.com/users/show.xml?screen_name=technolocus users/show in JSON: http://twitter.com/users/show.json?screen_name=technoloc...

Cache design: flyweight of mutable entity objects based on an immutable key

A lot of different screens in my app refer to the same entity/business objects over and over again. Currently, each screen refers to their own copy of each object. Also, entity objects may themselves expose access to other entity objects, again new copies of objects are created. I'm trying to find a caching solution. I'm looking for som...

Python/mod_wsgi server global data

Hello All ... I have been looking into different systems for creating a fast cache in a web-farm running Python/mod_wsgi. Memcache and others are options ... But I was wondering: Because I don't need to share data across machines, wanting each machine to maintain a local cache ... Does Python or WSGI provide a mechanism for Python nat...

How to have a form data-bound to an object with losing its values on postback

Hi I use ADO.NET Entity-Framework, I have a page that is data-bound to an entity variable in the code file. The hierarchy of the item is Person.Orders I want the user to add/remove orders to this Person entity (Person.Orders.Add(order)), The problem is that while the entity is not saved yet, once the user makes a post back, the variabl...

Caching PHP script outputs on the client side

I have a php script that outputs a random image each time it's called. So when I open the script in a web browser, it shows one image and if I refresh, another image shows up. I'm trying to capture the correct image from visiting the web site through a command line (via mechanize). I used urllib2.urlopen(...) to grab the image, but each...

ASP.NET Cached page. State is saved but requires refresh

I have a webforms page that makes quite extensive use of AJAX. There are a number of links on it that take the user off to a different page. I want to maintain the state that the page was in should the user come back to it using the browser's back button. How I've gone about this is to store the page's state in session each time the use...

call_user_func_array vs. call_user_func

I ran across an interesting issue today. We have an application that utilizes Zend Frameworks caching functionality. A request to this application typically calls a factory method using the following line $result = call_user_func_array(array("myclass", "factory"), array($id)); The idea is to return an object from the factory method...

How to deal with browser cache?

What are your tricks on getting the caching part of web application just right? Make the expiry date too long and we'll have a lot of stale caches, too short and we risk the servers overloaded with unnecessary requests. How to make sure that all changes will refresh all cache? How to embed SVN revision into code/url? Does having mult...

What caching headers prevent browsers from requesting last modified dates from the server?

Since I version all my css/js/images, they never "change". It might go from sprite.4.png to sprite.5.png, but sprite.4.png will never change. Anyway, it seems pointless for the browsers to be checking for modified versions and receiving 304 responses, so what do I need to put in .htaccess to prevent these last modified look ups? Right ...

JavaScript: Link from GitHub or link to local file?

I know that when linking to libraries such as jQuery that are hosted on Google Code it's better to link to the hosted one (Google's). But when there are other libraries and frameworks hosted on sites such as GitHub (like this jQuery LightBox, do you think its best to link to the library directly from GitHub, or should I download it and ...

memcached - using with a C# asp.net application

I'm considering using memcached (at some point) in my application i'm currently developing. Eventually, i'm planning on hosting this on Amazon EC2 - i was just wondering, would it be possible to have a linux server (aws instance) running memcached, and use the windows server (aws instance) for the app, but set it to use the linux serve...

Webservice caching reverse proxy?

I'd like to put some kind of caching reverse proxy in front of a SOAP webservice over HTTP to improve both performance and availability. Is there some software that performs this? (Preferably free and easy to install/use). The idea is here: the responses of the webservice vary with the request, but for each request the responses rarely...

What is the Cost of an L1 Cache Miss?

Edit: For reference purposes (if anyone stumbles across this question), Igor Ostrovsky wrote a great post about cache misses. It discusses several different issues and shows example numbers. End Edit I did some testing <long story goes here> and am wondering if a performance difference is due to memory cache misses. The following cod...

Best way to pass last error to custom error redirect?

Was wondering what you thought of this solution, if this is right way to pass an error message to a custom page? In web.config: <customErrors mode="On" defaultRedirect="~/Error.aspx"></customErrors> In Global.asax: <script RunAt="server"> void Application_Error(object sender, EventArgs e) { Exception ex = Server.GetLast...

Is there a way to use partial caching of a WebControl that includes CSS or JS file references?

The title pretty much says it. I've written a web control (a header) that is going into our common library, but it references a javascript file and a css file. It works fine the first time, but when I refresh the page it looses that reference because the control didn't get rendered again so it didn't put the references out there. Is ther...

ASP.NET MVC: OutputCache and http headers - Cache-Control

Hi guys I have just started using OutputCache on some of my controller actions and I am not quite getting the response I would expect. Basically I have set Location = OutputCacheLocation.Any and the http header is as follows: Server ASP.NET Development Server/9.0.0.0 Date Wed, 15 Jul 2009 02:14:21 GMT X-As...

ASP.Net Caching

I've got an application that downloads data from a 3rd party at 3am every morning Nothing changes in terms of content until then... is it possible to cache the "product info" page until then? or is this something i should set in global.asax? ...

C#: How to implement a smart cache

I have some places where implementing some sort of cache might be useful. For example in cases of doing resource lookups based on custom strings, finding names of properties using reflection, or to have only one PropertyChangedEventArgs per property name. A simple example of the last one: public static class Cache { private static ...

C#: Is it possible to use expressions or functions as keys in a dictionary?

Would it work to use Expression<Func<T>> or Func<T> as keys in a dictionary? For example to cache the result of heavy calculations. For example, changing my very basic cache from a different question of mine a bit: public static class Cache<T> { // Alternatively using Expression<Func<T>> instead private static Dictionary<Func<T...