caching

Guaranteed cache hits when retrieving data

Problem setting Entities arrive for processing and are taken through a series of steps which operate on those entities and possibly on other, related, entities and generate some results; Some of the entities are required to be processed in real-time, without any database access; Currently the implementation simply looks up entities in ...

PreparedStatement caching in Tomcat

I am looking for a way to achieve PreparedStatement caching, so as to save recreating the PreparedStatement objects for queries that were already executed in the past. Is there some built in way to achieve this using Tomcat? Or must I program this cache myself? ...

Cache memories in Multicore CPUs

Hello, I have few questions regarding Cache memories used in Multicore CPUs or Multipprocessors systems. (Although not directly related to programming, it has many repurcussions while one writes software for multicore processors/multiprocessors systems, hence asking here!) 1.) In a multiprocessor system or a multicore processor(Intel Q...

Caching Strategy for queried data

I'm currently in the process of building a repository for a project that will be DB intensive (Performance tests have been carried out and caching is needed hence why I'm asking ) The way I've got it set up now is that each object is individually cached, if I want to do a query for them objects I pass the query to the database and retur...

Cache-Control Headers in ASP.NET

I am trying to set the cache-control headers for a web application (and it appears that I'm able to do it), but I am getting what I think are odd entries in the header responses. My implementation is as follows: protected override void OnLoad(EventArgs e) { // Set Cacheability... DateTime dt = DateTime.Now.AddMin...

Why do images served from my web server not cache on the client?

I store all of my images behind the webroot (before /var/www/), which means that the web server is unable to send cache headers back for my pictures. What do I need to add to this to make the user's web cache work? Currently, this is getting hit every time by the same browser. My <img> path on my pages look something like this: <img s...

How to prevent Ajax/javascript result caching in browsers?

How to prevent browsers from caching Ajax results? I have and event triggered Ajax script the displays results only when the browsers data has been cleared. Tested in IE6 and Firefox 3.0.10 ...

Caching partial views in asp.net MVC

Hello, I have the following situation on a webapp: A table "Employees" contains column "Department" and "Function". Both are dropdownlists. The "Function" dropdownlist options depend on the selected "department". (so each department has its own list of functions) When changing the department, I do an ajax call to a controller actio...

Why some times Java does not request for new versions of jar files?

Every time we update our Java application (Java client and Java server) we have the problems that some clients approx. 1% - 2% does not load the new jar files. This occur with applets and also with Java Web Start. If you clear the Java Cache then all is working correct. Any idea why Java does not check for new jar files on every start? ...

DbLinq - Cache problem

I'm using linq to sql for MySql (using DbLinq) in an ASP.NET MVC website. I have a weird caching problem. Consider the following methods in my Repository class: public IEnumerable<Message> GetInbox(int userId) { using(MyDataContext repo = new MyDataContext(new MySqlConnection("[Connectionstring]"))) { return repo.Messages.Where(...

LFU Cache in C#?

Is there a ready made LFU Cache available in C#? ...

Caching best practiced in Merb

Hey guys! Im a beginner in Merb, so want to know, what is the best practices to cache data? For example i have a page that shows list of books, that changes not really often, so im looking for a way to cache the data. There can be 2 choices: cache data from db or cache all page (html). So, is there any tools to make simple and fast? Th...

Getting the data retrieved by SqlDataSource (ASP.Net)

I have a SqlDataSource retrieve tabular data from a store procedure. How can I get to the data it retrieved in order to save it to the cache? ...

Browser Caching in ASP.NET application

Any suggestions on how to do browser caching within a asp.net application. I've found some different methods online but wasn't sure what would be the best. Specifically, I would like to cache my CSS and JS files. They do change, however, it is usually once a month at the most. ...

How can I prevent IE Caching from causing duplicate Ajax requests?

We are using the Dynamic Script Tag with JsonP mechanism to achieve cross-domain Ajax calls. The front end widget is very simple. It just calls a search web service, passing search criteria supplied by the user and receiving and dynamically rendering the results. Note - For those that aren’t familiar with the Dynamic Script Tag with Jso...

Is mod_wsgi/Python optimizing things out?

Hello all, I have been trying to track down weird problems with my mod_wsgi/Python web application. I have the application handler which creates an object and calls a method: def my_method(self, file): self.sapi.write("In my method for %d time"%self.mmcount) self.mmcount += 1 # ... open file (absolute path to file), extrac...

Problem With Smarty caching !

i used smarty in my projects when i enable caching it’s not working . because i use this structure : index.php — display(index.tpl) index.tpl —- {include file=$page_center} ?module=product — $smarty->assign(”page_center” , “product.tpl”) ; ok ? i’m in product.php so poduct.tpl must load in center of index.tpl . whe...

Why isn't my custom delivered image caching in the browser?

I have a custom handler that is returning an image to the browser. The images are fetched from a database. For some reason the images are not being cached by the browser, and I was wondering if someone might be able to spot what I am missing from the below code: HttpContext.Current.Response.BinaryWrite(imageBytes); HttpContext.Current...

How to compress a .net object instance using gzip.

I am wanting to compress results from QUERYS of the database before adding them to the cache. I want to be able to compress any reference type. I have a working version of this for compressing strings.. the idea based on scott hanselman 's blog post http://shrinkster.com/173t any ideas for compressing a .net object? I know that it w...

Static caches in web services

Is this the right way to initialize a static cache object in a web service? public class someclass{ private static Cache cache; static someclass() { cache = HttpContext.Current.Cache; } } More Info: Seems like I receive more then one cache object from webservice. It creates a new request that only lasts for the dura...