caching

Caching with ASP.NET

I have form that displays several keywords (standard set of choice lists that changes rarely). There are about 4 such fields and each have about 20 choices or so. I'm thinking if caching the keywords will be helpful for performance / best practice? Is there a strategy for determining when to cache? ...

What point should you cache a value for a Property?

I've always wondered about when and where is the best time to cache a property value... Some of them seem pretty simple, like the one below... public DateTime FirstRequest { get { if (this.m_FirstRequest == null) { this.m_FirstRequest = DateTime.Now; } return (DateTime)this.m_FirstRequest; } }...

ASP.NET Data Cache - Does Overwriting Imply Removal And Re-Addition?

If I add an item to the cache named "foo", and then add another item named "foo" to the cache before the first expires, will this trigger the CacheItemRemoved event? ...

How to cache data in a MVC application

I have read lots of information about page caching and partial page caching in a MVC application. However, I would like to know how you would cache data. In my scenario I will be using LINQ to Entities (entity framework). On the first call to GetNames (or whatever the method is) I want to grab the data from the database. I want to save ...

How to determine total size of ASP.Net cache?

I'm using the ASP.net cache in a web project, and I'm writing a "status" page for it which shows the items in the cache, and as many statistics about the cache as I can find. Is there any way that I can get the total size (in bytes) of the cached data? The size of each item would be even better. I want to display this on a web page, so I...

How can I get the expiry datetime of an HttpRuntime.Cache object?

Is it possible to get the expiry datetime of an HttpRuntime.Cache object? If so, what would be the best approach? ...

Rails Caching DB Queries and Best Practices

The DB load on my site is getting really high so it is time for me to cache common queries that are being called 1000s of times an hour where the results are not changing. So for instance on my city model I do the following: def self.fetch(id) Rails.cache.fetch("city_#{id}") { City.find(id) } end def after_save; Rails.c...

Is it possible to cache resources loaded in an iPhone UIWebView?

I have a simple app loading a site optimized for the iPhone in a UIWebView. Problem is, caching does not seem to work: [webView loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: url] cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: ...

MySQL query takes >15 seconds to run, what can I do to cache/improve it? [PHP]

Well I have a videos website and a few of its tables are: tags id ~ int(11), auto-increment [PRIMARY KEY] tag_name ~ varchar(255) videotags tag_id ~ int(11) [PRIMARY KEY] video_id ~ int(11) [PRIMARY KEY] videos id ~ int(11), auto-increment [PRIMARY KEY] video_name ~ varchar(255) Now at this point the tags table has >1000 rows a...

Differences in reload behavior between FF and IE

In Firefox a Reload seems to reload everything while on IE the Refresh reloads just the HTML part of the current page. In IE you need to press Ctrl-F5 for a complete reload. Why this difference and is it somewhere an article explaining this difference more thoroughly? ...

How to test django caching?

Is there a way to be sure that a page is coming from cache on a production server and on the development server as well? The solution shouldn't involve caching middleware because not every project uses them. Though the solution itself might be a middleware. Just checking if the data is stale is not a very safe testing method IMO. ...

Big MySQL Tables

I'm working on a problem that requires caching paginated "search" results: http://stackoverflow.com/questions/347277/paginating-very-large-datasets The search works as follows: given an item_id, I find the matching item_ids and their rank. I'm willing to concede not showing my users any results past, say, 500. After 500, I'm going to...

How do I clear IE's cache when running Web Developer Express?

I'm trying to debug some IE-only issues for a site I'm developing. I'm running WDE because there's no Firebug for IE. I want to see whether some changes fix a bug, but no matter what I do, IE never picks up my changes. I've tried all of the following: stopping and restarting the debug evnironment closing and re-opening WDE closing a...

google sitemap - should I provision for load control / caching?

I have a community site which has around 10,000 listings at the moment. I am adopting a new url strategy something like example.com/products/category/some-product-name As part of strategy, I am implementing a site map. Google already has a good index of my site, but the URLs will change. I use a php framework which accesses the DB for...

Akamai Cache refresh

Hi, anybody know how often akamai servers refresh their cache? I'm a webdesigner, and we use akamai's servers to cache frequently accessed files. When uploading and overwriting files to the akamai FTP, i can't see my new file reflected live. Anybody have any experience with this? thanks! ...

ADO.NET Data Services 'Astoria' and Caching

Hello all, I just started diving into ADO.NET Data Services for a project, and I quickly ran into a problem. At first I was amazed by the performance, but then I realized that the data was cached. My project relies on real-time data, and I'd love to use the ADO.NET Data Services REST query syntax (without needing to use WCF or SOAP), bu...

RAMDrive for compiling - is there such a thing?

An answer (see below) to one of the question right here on SO gave me an idea for a great little piece of software that could be invaluable to coders everywhere. I'm imagining a RAMDrive software, but with one cruicial difference - it would mirror a real folder on my hard drive. More specifically - the folder which contains the project ...

Caching HTML output with PHP

Hi! I would like to create a cache for my php pages on my site. I did find too many solutions but what I want is a script which can generate an HTML page from my database ex: I have a page for categories which grabs all the categories from the DB, so the script should be able to generate an HTML page of the sort: my-categories.html. the...

phpbb3 cache issues

hi, i have an issue with caching of templates in phpbb3. i have made changes to a template in the admin control panel and saved it, then cleared the template cache through the "purge cache" and i don't see changes reflecting on the forum, but the change WAS saved in the admin control panel. i next edited the template file manually (not t...

Output Caching - GetVaryByCustomString based on value set in PageLoad()

I am using ASP.net Output Caching and want to implement GetVaryByCustomString () version of it. However I've gotten into a problem when the cache is based on a value set in the PageLoad() of a page. When Default.aspx load, the version of the USER CONTROL I would like to show is based on the URL which needs to go through a database query...