Questions tagged [caching]

A cache is a mechanism for temporarily storing (caching) data locally in order to reduce access time to data stored far away. For CPU/disk/web browsing please use relevant tags (cpu-cache, diskcache,...)

A cache is a mechanism that involves temporarily storing data in places that are faster to access than the original storage location. can be machine code instructions, images, documents, or web pages, for example. The purpose of a cache is to reduce access time, bandwidth usage, server load, and perceived lag.

Different applications where cache mechanisms are used include:

Useful Links

37958 questions
12
votes
6 answers

Visual Studio, change app icon, how?

I am working on a first time C# project in Visual Studio 2005 and I am wondering if there is anything special that needs doing to change the application icon apart from changing the correct resource in the project properties. I manage to view the…
mr-euro
  • 2,732
  • 5
  • 23
  • 27
12
votes
2 answers

Caching repeating query results in MongoDB

I am going to build a page that is designed to be "viewed" alot, but much fewer users will "write" into the database. For example, only 1 in 100 users may post his news on my site, and the rest will just read the news. In the above case, 100 SAME…
MK Yung
  • 4,344
  • 6
  • 30
  • 35
12
votes
1 answer

Spring Cache Abstraction VS interfaces VS key param ("Null key returned for cache operation" error)

While implementing, I came across a problem with Spring Cache Abstraction VS interfaces. Lets say I have the following interface: package com.example.cache; public interface IAddItMethod { Integer addIt(String key); } And the two…
dostiguy
  • 123
  • 1
  • 1
  • 4
12
votes
3 answers

ViewPager + FragmentStatePagerAdapter + orientation change

I have a little Problem: i have a ViewPager with some Pages and i use the FragmentStatePagerAdapter to handle the data. In portrait i have for example 20 pages for the ViewPager and in landscape i have just 10 pages for the ViewPager. So on a…
Informatic0re
  • 6,300
  • 5
  • 41
  • 56
12
votes
2 answers

How can I reduce my data transfer cost? Amazon S3 --> Cloudflare --> Visitor

I recently started using Amazon S3 to serve images to my visitors since this will reduce the server load. Now, there is a new problem: Today I looked into my AWS billings. I noticed that I have a huge bill waiting for me - there has been a total of…
Jonas Kaufmann
  • 1,797
  • 3
  • 22
  • 43
12
votes
6 answers

What is the proper way to tell the browser not to cache?

I have a web page that always needs to stay current. I do not want the browser to cache it. To that end, this meta tag is embedded with the page: However, some browsers seem to ignore…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
12
votes
6 answers

Mod_pagespeed delete cache?

We have a server (OVH - France), with Apache and mod_pagespeed. On this server, I have an installation of WordPress. I made a change in a Javascript file in my theme, but pagespeed don't understand there is a new file, and keeps loading the original…
Szed
  • 153
  • 1
  • 1
  • 8
12
votes
3 answers

What does Microsoft recommend for 2nd level Caching in Entity Framework?

I've used "EF Provider Wrappers" made by Jarek Kowalski. It works fine but I noticed "Limitations and Disclaimers" section where it says: The providers have not been extensively tested beyond what’s included in the sample code, so you should use…
Raj
  • 2,642
  • 3
  • 22
  • 20
12
votes
9 answers

Can i cache the output of a command on Linux from CLI?

I'm looking for an implementation of a 'cacheme' command, which 'memoizes' the output (stdout) of whatever has in ARGV. If it never ran it, it will run it and somewhat memorize the output. If it ran it, it will just copy the output of the file (or…
Riccardo
  • 1,104
  • 13
  • 22
12
votes
3 answers

Need an example of HttpResponseCache in Android

Hi I am trying to use the HttpResponseCache introduced in Android 4.The docs do talk clearly about how to install the cache but I am at a complete loss on how to cache Images downloaded from the net.Earlier I was using the DiskLruCache to cache…
Rasmus
  • 8,248
  • 12
  • 48
  • 72
12
votes
1 answer

Maximum expiration time for Cache Services in Google Apps Script

Does anybody know what the maximum expiration time for Cache Services in Google Apps Script is? I am running my script on Google Sites and have tried to run a trigger that re-caches the cache, but the cache seems to still expire overnight and I am…
tiampen
  • 121
  • 4
12
votes
3 answers

Is it possible to set ETags using JAX-RS without resorting to Response objects?

In one of the few questions (with answers) I have found on SO regarding JAX-RS and caching, the answer to generating ETags (for caching) is by setting some values on the Response object. As in the following: @GET @Path("/person/{id}") public…
oligofren
  • 20,744
  • 16
  • 93
  • 180
12
votes
4 answers

How to flush the CPU cache in Linux from a C program?

I am writing a C program in which I need to flush my memory. I would like know if there is any UNIX system command to flush the CPU cache. This is a requirement for my project which involves calculating the time taken for my logic. I have read about…
Rose BEck
  • 185
  • 1
  • 1
  • 10
12
votes
5 answers

Caching Data in ASP.NET MVC 3

I have an ASP.NET MVC 3 app that is basically just a set of web services. These web services are exposed by a set of Controller actions. Each controller action queries my database. Because my data rarely changes, and, stale data is not a concern, I…
user70192
  • 13,786
  • 51
  • 160
  • 240
12
votes
2 answers

Is Zookeeper appropriate for object caching?

Developing a cloud system with an eye on scalability meaning that the system is composed into REST-based services along functional boundaries (usermgmt, ordermgmt, customermgt etc) each with its own underlying database and depending on load, its…