Cache: Wikis

  
  

Encyclopedia

From Wikipedia, the free encyclopedia

.In computer science, a cache (pronounced /ˈkæʃ/ kash) is a component that improves performance by transparently storing data such that future requests for that data can be served faster.^ By caching data in fast, pricey memory, you speed up your system performance.
  • secondary cache - Glossary - CNET.com 10 February 2010 12:52 UTC www.cnet.com [Source type: Academic]

^ WordPress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and the building the page from the database".
  • WordPress › WP Widget Cache « WordPress Plugins 10 February 2010 12:52 UTC wordpress.org [Source type: General]

^ Experimental evaluation based on file system benchmarks and typical applications show that dm-cache can significantly improve the performance and scalability of a storage system by orders of magnitude.
  • Generic Block-level Disk Cache 10 February 2010 12:52 UTC users.cis.fiu.edu [Source type: Reference]

.The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere.^ This is possible because the data is a duplication of the original data that is stored in a different place or that was computed earlier.

^ In a large web application where performance is important, caching might be appropriate at many levels within your architecture.
  • The Jakarta-Taglibs Project: Cache Tag Library 10 February 2010 12:52 UTC jakarta.apache.org [Source type: General]

^ Note that this implementation is not cluster-aware, so changes are only visible within the cache's local JVM. Also, this is not a write-through cache (the backing data-store is not affected on updates) so changes will be lost when the cache is refreshed.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

.If requested data is contained in the cache (cache hit), this request can be served by simply reading the cache, which is comparably faster.^ Cache data in different types of container .

^ Data requests that can be answered within a given cache are referred to as hits.
  • Athlon II Or Phenom II: Does Your CPU Need L3 Cache? : L3 Cache: How Important Is It To AMD? - Review Tom's Hardware 10 February 2010 12:52 UTC www.tomshardware.com [Source type: FILTERED WITH BAYES]

^ Cache a Drupalban A cache (pronounced /kæʃ/ ) is a collection of data duplicating original values Stored elsewhere or computed earlier, where the original data is expensive to fetch (owing to longer access time) or to compute, compared to the cost of reading the cache.

.Otherwise (cache miss), the data has to be recomputed or fetched from its original storage location, which is comparably slower.^ If the data is not cached (a cache miss ) then it is fetched from main memory and also saved in the cache.
  • Cache Definition | Definition of Cache at Dictionary.com 10 February 2010 12:52 UTC dictionary.reference.com [Source type: FILTERED WITH BAYES]
  • cache from FOLDOC 10 February 2010 12:52 UTC foldoc.org [Source type: FILTERED WITH BAYES]
  • cache 10 February 2010 12:52 UTC burks.brighton.ac.uk [Source type: FILTERED WITH BAYES]

^ Fetch the data from cache 6.

^ (A cache miss is when a piece of requested data is not in the cache and has to be fetched from memory.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

.Hence, the more requests can be served from the cache the better the overall system performance is.^ Caching - memory is good, more is better.
  • OpenLDAP Faq-O-Matic: How do I determine the proper BDB/HDB database cache size? 10 February 2010 12:52 UTC www.openldap.org [Source type: FILTERED WITH BAYES]

^ It is more flexible and provides better performance.

^ More importantly, Fast-Cache simulations run only 2 to 5.5 times slower than the original program, making cache simulation feasible for every-day performance tuning.
  • http://www.cs.duke.edu/~alvy/fast-cache/ 10 February 2010 12:52 UTC www.cs.duke.edu [Source type: FILTERED WITH BAYES]

.As opposed to a buffer, which is managed explicitly by a client, a cache stores data transparently: This means that a client who is requesting data from a system is not aware that the cache exists.^ The cache manager stores all cached data, meaning it has some sort of container at its heart.
  • Painter Cache - K-3D 10 February 2010 12:52 UTC www.k-3d.org [Source type: FILTERED WITH BAYES]

^ Client side cache management .
  • Cache Management in ASP.NET - CodeProject 10 February 2010 12:52 UTC www.codeproject.com [Source type: FILTERED WITH BAYES]

^ The basic functionality of the cache manager is to store the data.
  • Painter Cache - K-3D 10 February 2010 12:52 UTC www.k-3d.org [Source type: FILTERED WITH BAYES]

.Therefore the name cache (from French "cacher", to conceal).^ The word cache (pronounced 'cash') derives from the French word 'cacher' (to conceal).
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ In the 1700s Pierre Mermet, a French explorer, named the river "Cache" because it looked like a great basin.
  • The Cache River Wetlands 10 February 2010 12:52 UTC www.lib.niu.edu [Source type: FILTERED WITH BAYES]

^ [French, from Old French, from cacher , to press ; see cache .
  • Cachet Definition | Definition of Cachet at Dictionary.com 10 February 2010 12:52 UTC dictionary.reference.com [Source type: Reference]

.To be cost efficient and to enable an efficient lookup of data, caches are comparably small.^ Approaching data altering operations as events presents a good case for employing the Observer pattern in order to enable cache expiration when such events take place.
  • Cache watch « nutrun 10 February 2010 12:52 UTC nutrun.com [Source type: FILTERED WITH BAYES]

^ Cache a Drupalban A cache (pronounced /kæʃ/ ) is a collection of data duplicating original values Stored elsewhere or computed earlier, where the original data is expensive to fetch (owing to longer access time) or to compute, compared to the cost of reading the cache.

^ If shared-cache mode is enabled and a thread establishes multiple connections to the same database, the connections share a single data and schema cache.
  • SQLite Shared-Cache Mode 10 February 2010 12:52 UTC www.sqlite.org [Source type: Reference]

.Nevertheless, caches have proven extremely effective in many areas of computing because access patterns in typical computer applications have locality of reference.^ The cache is effective because it exploits `temporal and spatial locality of reference'.
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

^ Experimental evaluation based on file system benchmarks and typical applications show that dm-cache can significantly improve the performance and scalability of a storage system by orders of magnitude.
  • Generic Block-level Disk Cache 10 February 2010 12:52 UTC users.cis.fiu.edu [Source type: Reference]

^ This file extension is named after 'cache', which in computer science is a collection of data stored in a frequently accessed temporary storage area where it can be easily accessed.

.References exhibit temporal locality if data is requested again that has been recently requested already.^ What is temporal and spatial locality of reference?
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

^ Data which was accessed a moment back might be accessed again and again (temporal locality); a typical example is instructions in a loop.
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

^ With the property of locality of reference in mind, it makes sense to cache an entire region of memory when a location from that region is requested.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

.References exhibit spatial locality if data is requested that is physically stored close to data that has been requested already.^ What is temporal and spatial locality of reference?
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

^ Often these modules are used in web applications to store data locally to save repeated and redundant expensive calls to remote machines or databases.
  • Cache::Cache - search.cpan.org 10 February 2010 12:52 UTC search.cpan.org [Source type: FILTERED WITH BAYES]
  • The Perl Cache homepage 10 February 2010 12:52 UTC perl-cache.sourceforge.net [Source type: FILTERED WITH BAYES]

^ In essence, it does nothing more than store your Web service requests in local files.
  • PHP: Cache Yahoo! Web Service REST Calls - Yahoo! Developer Network 10 February 2010 12:52 UTC developer.yahoo.com [Source type: General]

Contents

Operation

Diagram of a CPU memory cache
.Hardware implements cache as a block of memory for temporary storage of data likely to be used again.^ Cache like behavior is provided where it is useful, e.g.
  • Subsets, A Way To Manage Cache Memory Contents 10 February 2010 12:52 UTC showcase.netins.net [Source type: FILTERED WITH BAYES]

^ This implementation use the GUID of the cache.
  • Cache 10 February 2010 12:52 UTC ehcache.org [Source type: FILTERED WITH BAYES]

^ But SRAM is used for Cache memory.

.CPUs and hard drives frequently use a cache, as do web browsers and web servers.^ Files in the web browser's cache folder can be opened using the web browser itself.

^ Web caching stores frequently used objects closer to the client through browser, proxy, or server caches.
  • Use Server Cache Control to Improve Performance - apache web server settings for optimized caching with configuration files 10 February 2010 12:52 UTC www.websiteoptimization.com [Source type: General]

^ Proxies, browsers, and your server will cache it.
  • ASP.NET Cache Examples and Overview 10 February 2010 12:52 UTC dotnetperls.com [Source type: Reference]

.A cache is made up of a pool of entries.^ The cast was made up of kids from Cache.
  • Cache, Oklahoma 10 February 2010 12:52 UTC cacheok.com [Source type: General]

^ Here main point to note is that a separate cache entry will be created for each of different value of the CountryDropListBox control also each cache entry will be made for each page where this control is placed.  .
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ The keep pool's purpose is to take small objects that should always be cached, for example Look Up Tables .
  • Oracle's buffer cache 10 February 2010 12:52 UTC www.adp-gmbh.ch [Source type: FILTERED WITH BAYES]

.Each entry has a datum (a nugget of data) - a copy of the same datum in some backing store.^ Browser caches and Internet caches store copies of Web pages retrieved by the user for some period of time in order to speed up retrieval the next time the same page is requested (see Web cache and browser cache ).

^ RAM entries can either be direct-mapped, meaning that there can only be one position in a cache for copies of main memory, or they may be n-way associative, which stands for n possible positions in the cache to store data.
  • Athlon II Or Phenom II: Does Your CPU Need L3 Cache? : L3 Cache: How Important Is It To AMD? - Review Tom's Hardware 10 February 2010 12:52 UTC www.tomshardware.com [Source type: FILTERED WITH BAYES]

^ When the CPU first fetches data from memory location 0, a copy of it is stored in the cache.
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

.Each entry also has a tag, which specifies the identity of the datum in the backing store of which the entry is a copy.^ Once the cache reaches its maximum allowable size it prunes itself back to a specified smaller size, choosing which entries to evict according to a specified eviction-policy ( ).
  • Local Cache - Coherence 3.4 User Guide - Oracle Coherence Knowledge Base 10 February 2010 12:52 UTC coherence.oracle.com [Source type: FILTERED WITH BAYES]

.When the cache client (a CPU, web browser, operating system) needs to access a datum presumed to exist in the backing store, it first checks the cache.^ See Web cache and browser cache .
  • DSP DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.dspdesignline.com [Source type: FILTERED WITH BAYES]
  • EETimes Encyclopedia 10 February 2010 12:52 UTC www.eetimes.com [Source type: FILTERED WITH BAYES]
  • EDA DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.edadesignline.com [Source type: FILTERED WITH BAYES]
  • ChannelWeb Encyclopedia 10 February 2010 12:52 UTC www.crn.com [Source type: General]

^ Your Web browser caches pages, too.
  • Django | Django’s cache framework | Django documentation 10 February 2010 12:52 UTC docs.djangoproject.com [Source type: FILTERED WITH BAYES]
  • Chapter 14: Caching 10 February 2010 12:52 UTC www.djangobook.com [Source type: FILTERED WITH BAYES]

^ If the CPU needs a data word the caches are searched first.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

.If an entry can be found with a tag matching that of the desired datum, the datum in the entry is used instead.^ To achieve adequate performance the cache logic would have to be able to pick from all these entries the one matching a given tag in just a few cycles.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

This situation is known as a cache hit. .So, for example, a web browser program might check its local cache on disk to see if it has a local copy of the contents of a web page at a particular URL. In this example, the URL is the tag, and the contents of the web page is the datum.^ Each browser may have a way of stopping or minimizing the caching of web pages.
  • Web Center: Clearing the Browser Cache - Web Center - Ohlone College, Fremont, Newark, East Bay Area, California 10 February 2010 12:52 UTC www.ohlone.edu [Source type: General]

^ This will make the browser retreive the latest copy of a web page even if it's in the cache.
  • How to clear browser cache 10 February 2010 12:52 UTC www.chami.com [Source type: General]

^ See Web cache and browser cache .
  • DSP DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.dspdesignline.com [Source type: FILTERED WITH BAYES]
  • EETimes Encyclopedia 10 February 2010 12:52 UTC www.eetimes.com [Source type: FILTERED WITH BAYES]
  • EDA DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.edadesignline.com [Source type: FILTERED WITH BAYES]
  • ChannelWeb Encyclopedia 10 February 2010 12:52 UTC www.crn.com [Source type: General]

.The percentage of accesses that result in cache hits is known as the hit rate or hit ratio of the cache.^ Results on byte hit ratios are similar.
  • Benefits of Cache Sharing 10 February 2010 12:52 UTC pages.cs.wisc.edu [Source type: FILTERED WITH BAYES]

^ From this, we can derive the hit rate , or the average percentage of times that the processor will get a cache hit.
  • SystemLogic.net - The Fundamentals Of Cache 10 February 2010 12:52 UTC www.slcentral.com [Source type: FILTERED WITH BAYES]

^ The block cache miss ratio tells how often Resin needs to access the disk to read a cache entry.
  • Server Caching 10 February 2010 12:52 UTC caucho.com [Source type: FILTERED WITH BAYES]

.The alternative situation, when the cache is consulted and found not to contain a datum with the desired tag, has become known as a cache miss.^ References not found in the cache are called cache misses.
  • This is a basic Cache Tutorial 10 February 2010 12:52 UTC www.ecs.umass.edu [Source type: FILTERED WITH BAYES]

^ It is possible to specify multiple cache tags in the same page without specifying keys - in this situation an index is appended to the key of subsequent tags.

^ Custom Search Cache Creek has become big with the “short boat” set because it contains many good play spots.
  • California Creeks - Cache Creek 10 February 2010 12:52 UTC cacreeks.com [Source type: Original source]

.The previously uncached datum fetched from the backing store during miss handling is usually copied into the cache, ready for the next access.^ Workplace « Previous Post Next Post » All Posts Cache closing stores .
  • Cache closing stores - Orange County Retail : The Orange County Register 10 February 2010 12:52 UTC retail.freedomblogging.com [Source type: News]

^ The cache controller then guesses at the next access and loads it into the cache.

^ Browser caches and Internet caches store copies of Web pages retrieved by the user for some period of time in order to speed up retrieval the next time the same page is requested (see Web cache and browser cache ).

.During a cache miss, the CPU usually ejects some other entry in order to make room for the previously uncached datum.^ Usually, a cache has some size limit.
  • Painter Cache - K-3D 10 February 2010 12:52 UTC www.k-3d.org [Source type: FILTERED WITH BAYES]

^ Entry # is the order in which the cache entry was actually enumerated from the cache.
  • CacheMonitor II For Internet Explorer 10 February 2010 12:52 UTC www.enigmaticsoftware.com [Source type: FILTERED WITH BAYES]

^ Because Wanghy-Cache is based on interfaces, rather than classes, it is easy to extend in order to add support for other cache providers.

.The heuristic used to select the entry to eject is known as the replacement policy.^ Replacement policies dictate how room is created in a full cache for new cache entries.
  • Athlon II Or Phenom II: Does Your CPU Need L3 Cache? : L3 Cache: How Important Is It To AMD? - Review Tom's Hardware 10 February 2010 12:52 UTC www.tomshardware.com [Source type: FILTERED WITH BAYES]

^ The default size is 50MB. The replacement policy predicts a "time of next use" for each block in the cache.

^ The replacement policy for the cache was real LRU ( Least Recently Used ).
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

.One popular replacement policy, "least recently used" (LRU), replaces the least recently used entry (see cache algorithms).^ The cache operates in what is known alternately as a Most Recently Used (MRU) or uses a Least Recently Used (LRU) algorithm.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

^ Most caches evict the Least Recently Used (LRU) element first.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

^ The Cache will use a policy at startup.
  • Cache 10 February 2010 12:52 UTC ehcache.org [Source type: FILTERED WITH BAYES]

.More efficient caches compute use frequency against the size of the stored contents, as well as the latencies and throughputs for both the cache and the backing store.^ Overrides the *accept_encoding* value used by the cache to store the cached content.
  • DevCentral Wiki: CACHE 10 February 2010 12:52 UTC devcentral.f5.com [Source type: Reference]

^ Content is stored in and retrieved from the cache using URI based keys.
  • mod_mem_cache - Apache HTTP Server 10 February 2010 12:52 UTC clubs.uci.edu [Source type: Reference]

^ CACHE::accept_encoding - Overrides the accept_encoding value used by the cache to store the cached content.
  • DevCentral Wiki: CACHE 10 February 2010 12:52 UTC devcentral.f5.com [Source type: Reference]

.While this works well for larger amounts of data, long latencies and slow throughputs, such as experienced with a hard drive and the Internet, it is not efficient for use with a CPU cache.^ This approach is very useful when we want to cache large amounts of data.
  • Cache Management in ASP.NET - CodeProject 10 February 2010 12:52 UTC www.codeproject.com [Source type: FILTERED WITH BAYES]

^ If so, the cached data is used.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ Squeeze Out More Performance with Cache: With a MicroMac Cache card you speed up many operations on your Macintosh, such as CPU throughput, accessing frequently used data, performing complex image filtering or effect and spell checking documents.
  • MicroMac Quadra Cache Cards 10 February 2010 12:52 UTC www.micromac.com [Source type: General]

[citation needed]
. When a system writes a datum to the cache, it must at some point write that datum to the backing store as well.^ Write the results back to cache 8.

^ It must at some point assert itself and force the writes to be performed.
  • Windows File Cache Usage 10 February 2010 12:52 UTC dotnetperls.com [Source type: Reference]

^ Note that this implementation is not cluster-aware, so changes are only visible within the cache's local JVM. Also, this is not a write-through cache (the backing data-store is not affected on updates) so changes will be lost when the cache is refreshed.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

.The timing of this write is controlled by what is known as the write policy.^ A tool to help the user compute the average access time due depending on the read or write policies in effect.
  • This is a basic Cache Tutorial 10 February 2010 12:52 UTC www.ecs.umass.edu [Source type: FILTERED WITH BAYES]

.In a write-through cache, every write to the cache causes a synchronous write to the backing store.^ Write Through versus Write Back .
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ Block replacement write-through cache write-back cache write-around .
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ Write the results back to cache 8.

.Alternatively, in a write-back (or write-behind) cache, writes are not immediately mirrored to the store.^ Write-back Cache .
  • Xserve RAID: About Controller Cache Memory 10 February 2010 12:52 UTC support.apple.com [Source type: General]

^ Note that this implementation is not cluster-aware, so changes are only visible within the cache's local JVM. Also, this is not a write-through cache (the backing data-store is not affected on updates) so changes will be lost when the cache is refreshed.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

^ Specified by: getWriteBehind in interface Ehcache Returns: the write behind instance that's associated with this cache .
  • Cache 10 February 2010 12:52 UTC ehcache.org [Source type: FILTERED WITH BAYES]

.Instead, the cache tracks which of its locations have been written over and marks these locations as dirty.^ Instead, the cache line is only marked as dirty.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

^ Since data written into a cache eventually has to be available in the main memory, systems can either do this at the same time (write-through) or mark overwritten locations as “dirty” (write-back) and execute the write once the data is wiped out of the cache.
  • Athlon II Or Phenom II: Does Your CPU Need L3 Cache? : L3 Cache: How Important Is It To AMD? - Review Tom's Hardware 10 February 2010 12:52 UTC www.tomshardware.com [Source type: FILTERED WITH BAYES]

^ Each of these line addresses corresponds to a location in a sub-cache.
  • This is a basic Cache Tutorial 10 February 2010 12:52 UTC www.ecs.umass.edu [Source type: FILTERED WITH BAYES]

.The data in these locations is written back to the backing store when those data are evicted from the cache, an effect referred to as a lazy write.^ When the cache is full and regions need to be evicted, the region is written back to memory.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ These are refered to as policy caches.

^ Write-back Cache .
  • Xserve RAID: About Controller Cache Memory 10 February 2010 12:52 UTC support.apple.com [Source type: General]

.For this reason, a read miss in a write-back cache (which requires a block to be replaced by another) will often require two memory accesses to service: one to retrieve the needed datum, and one to write replaced data from the cache to the store.^ Retrieves cached information from APC's data store .
  • PHP: apc_cache_info - Manual 10 February 2010 12:52 UTC us.php.net [Source type: Reference]

^ Block replacement write-through cache write-back cache write-around .
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ Each cache uses a data-loader to retrieve data from a data store.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

.Other policies may also trigger data write-back.^ The write-back policy is more sophisticated.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

^ With write back, a region is marked as 'dirty' once its data have been altered.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ In this mode, data is considered committed, or successfully received, as soon as the RAID controller writes back to the host that the information has been received in cache memory.
  • Xserve RAID: About Controller Cache Memory 10 February 2010 12:52 UTC support.apple.com [Source type: General]

.The client may make many changes to a datum in the cache, and then explicitly notify the cache to write back the datum.^ Write the results back to cache 8.

^ Note that this implementation is not cluster-aware, so changes are only visible within the cache's local JVM. Also, this is not a write-through cache (the backing data-store is not affected on updates) so changes will be lost when the cache is refreshed.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

^ Using a local cache on the SLC Client reserves the limited bandwidth of the network segment for file writes and security requests to the file server.
  • Shared LAN Cache Datasheet 10 February 2010 12:52 UTC www.lancache.com [Source type: Reference]

.No-write allocation is a cache policy which caches only processor reads, thus avoiding the need for write-back or write-through when the old value of the datum was absent from the cache prior to the write.^ Example read-only cache configuration .
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

^ Write Through versus Write Back .
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ Enabling write-through cache does not affect read cache settings.
  • Xserve RAID: About Controller Cache Memory 10 February 2010 12:52 UTC support.apple.com [Source type: General]

.Entities other than the cache may change the data in the backing store, in which case the copy in the cache may become out-of-date or stale.^ Tool tip shows if cache may be out of date.
  • Scripts Tagged cache – Userscripts.org 10 February 2010 12:52 UTC userscripts.org [Source type: General]

^ A writable cache is supplied for cases wherein the cached data can be changed by clients of the cache.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

^ Cache holds a copy of only the most frequently used information or program codes stored in the main memory; the smaller capacity of the cache reduces the time required to locate data within it and provide it to the computer for processing.
  • cache memory (computing) -- Britannica Online Encyclopedia 10 February 2010 12:52 UTC www.britannica.com [Source type: Reference]

.Alternatively, when the client updates the data in the cache, copies of that data in other caches will become stale.^ Disk cache memory operates similarly, but the cache is used to hold data that has been recently written on, or retrieved from, a magnetic disk or other external storage device.
  • cache memory (computing) -- Britannica Online Encyclopedia 10 February 2010 12:52 UTC www.britannica.com [Source type: Reference]

^ For storing small amount of data we should go for other ASP.NET in-process caching mechanisms.
  • Cache Management in ASP.NET - CodeProject 10 February 2010 12:52 UTC www.codeproject.com [Source type: FILTERED WITH BAYES]

^ The data all must become stale at the same time, as the cache is refreshed as a whole.
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

.Communication protocols between the cache managers which keep the data consistent are known as coherency protocols.^ This has resulted in a number of cache coherency protocols.

^ MSI is a basic but well known cache coherency protocol.

^ Another well known cache coherency protocol is the MESI protocol.

Applications

CPU cache

.Small memories on or close to the CPU can operate faster than the much larger main memory.^ We keep a small amount of high speed `cache' memory - and a much larger amount of `main' memory.
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

^ That's already two times faster than the main memory access.

^ Second Kind: Disk Caches A disk cache is a section of main memory or memory on the disk controller board that bridges the disk and the CPU. When the disk is read, a larger block of data is copied into the cache than is immediately required.
  • EETimes Encyclopedia 10 February 2010 12:52 UTC www.eetimes.com [Source type: FILTERED WITH BAYES]
  • ChannelWeb Encyclopedia 10 February 2010 12:52 UTC www.crn.com [Source type: General]

.Most CPUs since the 1980s have used one or more caches, and modern high-end embedded, desktop and server microprocessors may have as many as half a dozen, each specialized for a specific function.^ This is one of many Cache community picnics.
  • Cache, Oklahoma 10 February 2010 12:52 UTC cacheok.com [Source type: General]

^ The Translation Lookaside Buffer (TLB) in the 80486 is a special-purpose cache that is used to store the most recently used mappings from virtual to physical address spaces.
  • Perils of the PC Cache 10 February 2010 12:52 UTC www.ece.cmu.edu [Source type: FILTERED WITH BAYES]

^ In some cases, it may be necessary to clear your cache more than once.
  • Clearing your cache - Gmail Help 10 February 2010 12:52 UTC mail.google.com [Source type: General]

Disk cache

.While CPU caches are generally managed entirely by hardware, a variety of software manages other caches.^ Shared LAN Cache rejuvenates old file server hardware and software.
  • Shared LAN Cache Datasheet 10 February 2010 12:52 UTC www.lancache.com [Source type: Reference]

^ It is a generic cache frontend and is extended by other classes.
  • Zend Framework: Documentation: Zend_Cache Frontends - Zend Framework Manual 10 February 2010 12:52 UTC framework.zend.com [Source type: Reference]

^ First off: only a single CPU's cache needs to be "frozen" in order to effectively protect the encryption key; other CPUs are allowed to operate in normal cache mode.

.The page cache in main memory, which is an example of disk cache, is managed by the operating system kernel.^ This disk memory space is called the cache.
  • Interactive Glossary of Internet Terms: Letter C 10 February 2010 12:52 UTC www.walthowe.com [Source type: FILTERED WITH BAYES]

^ Example cache code for main page .
  • Cache - e107 Wiki 10 February 2010 12:52 UTC wiki.e107.org [Source type: Reference]

^ I had examples of cache listing pages with me.
  • Cache Mania » Geocaching Events 10 February 2010 12:52 UTC www.cachemania.com [Source type: General]

.While the hard drive's hardware disk buffer is sometimes misleadingly referred to as "disk cache", its main functions are write sequencing and read prefetching.^ Main memory reads and writes are whole cache lines .
  • Cache Definition | Definition of Cache at Dictionary.com 10 February 2010 12:52 UTC dictionary.reference.com [Source type: FILTERED WITH BAYES]

^ Second Kind: Disk Caches A disk cache is a section of main memory or memory on the disk controller board that bridges the disk and the CPU. When the disk is read, a larger block of data is copied into the cache than is immediately required.
  • DSP DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.dspdesignline.com [Source type: FILTERED WITH BAYES]
  • ChannelWeb Encyclopedia 10 February 2010 12:52 UTC www.crn.com [Source type: General]

^ An example of this would be very scientific calculations, where they don't write the disk much at all, and therefore, the data in the L1, L2, and main memory might not make it all the way to the hard drive, except in the situation where the results of all the computations need to be saved.
  • SystemLogic.net - The Fundamentals Of Cache 10 February 2010 12:52 UTC www.slcentral.com [Source type: FILTERED WITH BAYES]

.Repeated cache hits are relatively rare, due to the small size of the buffer in comparison to HDD's capacity.^ This in turn depends on the cache design but mostly on its size relative to the main memory.
  • Cache Definition | Definition of Cache at Dictionary.com 10 February 2010 12:52 UTC dictionary.reference.com [Source type: FILTERED WITH BAYES]

^ However, if the cache is too small in comparison to the cache-line size, it can reduce performance (because sometimes, irrelevant information is in the cache-line, and takes up valuable space).
  • SystemLogic.net - The Fundamentals Of Cache 10 February 2010 12:52 UTC www.slcentral.com [Source type: FILTERED WITH BAYES]

^ Using this cache means the circuitry to check for hits is fast and easy to design, but the hit ratio is relatively poor compared to the other designs because of its inflexibility.
  • SystemLogic.net - The Fundamentals Of Cache 10 February 2010 12:52 UTC www.slcentral.com [Source type: FILTERED WITH BAYES]

.In turn, fast local hard disk can cache information held on even slower data storage devices, such as remote servers (web cache) or local tape drives or optical jukeboxes.^ Figure 1: Local cache with local and remote clients .
  • NCache � Distributed Caching Topologies, Mirrored Cache, Replicated Cache, Partitioned Cache, Partition-Replica Cache, and Client Cache 10 February 2010 12:52 UTC www.alachisoft.com [Source type: FILTERED WITH BAYES]

^ The hard disks are also used to cache an even slower medium -- your Internet connection.

^ The remote-cache is always slower!

Such a scheme is the main concept of hierarchical storage management.

Web cache

.Web browsers and web proxy servers employ web caches to store previous responses from web servers, such as web pages.^ Web caching stores frequently used objects closer to the client through browser, proxy, or server caches.
  • Use Server Cache Control to Improve Performance - apache web server settings for optimized caching with configuration files 10 February 2010 12:52 UTC www.websiteoptimization.com [Source type: General]

^ Proxies, browsers, and your server will cache it.
  • ASP.NET Cache Examples and Overview 10 February 2010 12:52 UTC dotnetperls.com [Source type: Reference]

^ See Web cache and browser cache .
  • DSP DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.dspdesignline.com [Source type: FILTERED WITH BAYES]
  • EDA DesignLine : Design Resource for Automotive Engineering 10 February 2010 12:52 UTC www.edadesignline.com [Source type: FILTERED WITH BAYES]
  • ChannelWeb Encyclopedia 10 February 2010 12:52 UTC www.crn.com [Source type: General]

.Web caches reduce the amount of information that needs to be transmitted across the network, as information previously stored in the cache can often be re-used.^ Information that is used regularly and needs to be accessed quickly is stored in the file.

^ Re: Complex web site caching...
  • Cache Management in ASP.NET - CodeProject 10 February 2010 12:52 UTC www.codeproject.com [Source type: FILTERED WITH BAYES]

^ This information will be stored in a cache.

.This reduces bandwidth and processing requirements of the web server, and helps to improve responsiveness for users of the web.^ Many user actions require a response from the server.
  • Browser-Side Cache 10 February 2010 12:52 UTC ajaxpatterns.org [Source type: FILTERED WITH BAYES]

^ A web cache reduces latency and improves web site response times.
  • Use Server Cache Control to Improve Performance - apache web server settings for optimized caching with configuration files 10 February 2010 12:52 UTC www.websiteoptimization.com [Source type: General]

^ Memory caching improves server responsiveness primarily in environments that are running high-traffic applications that need to off-load activity directed towards their Hard Disk in order to help increase performance and responsiveness.
  • Zend Cache Extension 10 February 2010 12:52 UTC files.zend.com [Source type: FILTERED WITH BAYES]

.As of 2009, modern web browsers employ a built-in web cache, but some internet service providers or organizations also use a caching proxy server, which is a web cache that is shared between all users of that network.^ Files in the web browser's cache folder can be opened using the web browser itself.

^ Proxies, browsers, and your server will cache it.
  • ASP.NET Cache Examples and Overview 10 February 2010 12:52 UTC dotnetperls.com [Source type: Reference]

^ Management of the proxy cache uses the ProxyCacheMXBean .
  • Server Caching 10 February 2010 12:52 UTC caucho.com [Source type: FILTERED WITH BAYES]

.Another form of cache is P2P caching, where the files most sought for by peer-to-peer applications are stored in an ISP cache to accelerate P2P transfers.^ This is the most simplest form of caching.
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ The Translation Lookaside Buffer (TLB) in the 80486 is a special-purpose cache that is used to store the most recently used mappings from virtual to physical address spaces.
  • Perils of the PC Cache 10 February 2010 12:52 UTC www.ece.cmu.edu [Source type: FILTERED WITH BAYES]

^ Note that you currently cannot open and view files stored in the cache backup like you can with files that are in the actual cache.
  • CacheMonitor II For Internet Explorer 10 February 2010 12:52 UTC www.enigmaticsoftware.com [Source type: FILTERED WITH BAYES]

Other caches

.The BIND DNS daemon caches a mapping of domain names to IP addresses, as does a resolver library.^ The Translation Lookaside Buffer (TLB) in the 80486 is a special-purpose cache that is used to store the most recently used mappings from virtual to physical address spaces.
  • Perils of the PC Cache 10 February 2010 12:52 UTC www.ece.cmu.edu [Source type: FILTERED WITH BAYES]

^ If a cache key does not have an explicit definition in the caching scheme mappings (defined in confluence-coherence-cache-config.xml ) then it will use the "default" cache-mapping .
  • Cache Performance Tuning - Confluence Docs 3.1 - Atlassian Documentation - Confluence 10 February 2010 12:52 UTC confluence.atlassian.com [Source type: FILTERED WITH BAYES]

^ (Cache address wraparound within a direct mapped subset must be handled properly.
  • Subsets, A Way To Manage Cache Memory Contents 10 February 2010 12:52 UTC showcase.netins.net [Source type: FILTERED WITH BAYES]

.Write-through operation is common when operating over unreliable networks (like an Ethernet LAN), because of the enormous complexity of the coherency protocol required between multiple write-back caches when communication is unreliable.^ This has resulted in a number of cache coherency protocols.

^ Write Through versus Write Back .
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ The write-through cache is the simplest way to implement cache coherency.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

.For instance, web page caches and client-side network file system caches (like those in NFS or SMB) are typically read-only or write-through specifically to keep the network protocol simple and reliable.^ Example read-only cache configuration .
  • The Carbon Cache Module - Cache Service Design 10 February 2010 12:52 UTC carbon.sourceforge.net [Source type: Reference]

^ The FileStore , for example, is a fundamental store that reads & writes cache entries to the file system.
  • Merbunity - the new merb-cache 10 February 2010 12:52 UTC merbunity.com [Source type: General]

^ Your Web browser caches pages, too.
  • Django | Django’s cache framework | Django documentation 10 February 2010 12:52 UTC docs.djangoproject.com [Source type: FILTERED WITH BAYES]
  • Chapter 14: Caching 10 February 2010 12:52 UTC www.djangobook.com [Source type: FILTERED WITH BAYES]

.Search engines also frequently make web pages they have indexed available from their cache.^ Your Web browser caches pages, too.
  • Django | Django’s cache framework | Django documentation 10 February 2010 12:52 UTC docs.djangoproject.com [Source type: FILTERED WITH BAYES]

^ This local web site will focus on programs, services and publications available at the Cache County Office in Logan, Utah to better meet the needs of Cache Valley residents.
  • Cache County Extension - extension.usu.edu 10 February 2010 12:52 UTC extension.usu.edu [Source type: Academic]

^ WP-Cache is an extremely efficient WordPress page caching system to make you site much faster and responsive.
  • WP-Cache – WordPress Plugin Repository 10 February 2010 12:52 UTC dev.wp-plugins.org [Source type: General]

.For example, Google provides a "Cached" link next to each search result.^ Well guess what, I’m not the first person (Google Cache link) to think about this, and even a thread on memcached lists asks this question.

^ Naturally, only the benchmarks results really count, but the whole purpose of this technical excursion is to provide a look into the complexity behind multi-level caching.
  • Athlon II Or Phenom II: Does Your CPU Need L3 Cache? : L3 Cache: How Important Is It To AMD? - Review Tom's Hardware 10 February 2010 12:52 UTC www.tomshardware.com [Source type: FILTERED WITH BAYES]

^ In the next section, we'll look at this same example but this time, the librarian will use a caching system.

.This can prove useful when web pages from a web server are temporarily or permanently inaccessible.^ Describes how to create Caché Server Pages, an architecture and toolset for creating dynamic Web pages.

^ Caching gives web pages an effective way to increase performance while minimizing the use of server resources.
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ Web caching stores frequently used objects closer to the client through browser, proxy, or server caches.
  • Use Server Cache Control to Improve Performance - apache web server settings for optimized caching with configuration files 10 February 2010 12:52 UTC www.websiteoptimization.com [Source type: General]

.Another type of caching is storing computed results that will likely be needed again, or memoization.^ As a result, the stored data will not be cached again in PHP accelerators like APC .
  • eZ Components - Documentation - Tutorials 10 February 2010 12:52 UTC ezcomponents.org [Source type: FILTERED WITH BAYES]

^ Note that you currently cannot open and view files stored in the cache backup like you can with files that are in the actual cache.
  • CacheMonitor II For Internet Explorer 10 February 2010 12:52 UTC www.enigmaticsoftware.com [Source type: FILTERED WITH BAYES]

^ You can use the low-level cache API to store objects in the cache with any level of granularity you like.
  • Chapter 14: Caching 10 February 2010 12:52 UTC www.djangobook.com [Source type: FILTERED WITH BAYES]

.ccache, a program that caches the output of the compilation to speed up the second-time compilation, exemplifies this type.^ The amount of time to cache this content for (in seconds).

^ The process is automated and will take from about 10 minutes to a few hours, depending on the network speed, and the result will be most up-to-date template cache.
  • OS template cache preparation - OpenVZ Wiki 10 February 2010 12:52 UTC wiki.openvz.org [Source type: Reference]

^ To speed it up, she sets up a cache that will retain the calculations locally.
  • Browser-Side Cache 10 February 2010 12:52 UTC ajaxpatterns.org [Source type: FILTERED WITH BAYES]

.Database caching can substantially improve the throughput of database applications, for example in the processing of indexes, data dictionaries, and frequently used subsets of data.^ Subsets can be used as direct mapped caches.
  • Subsets, A Way To Manage Cache Memory Contents 10 February 2010 12:52 UTC showcase.netins.net [Source type: FILTERED WITH BAYES]

^ If so, the cached data is used.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ There is also an IDL cache which is used for Index Data Lookups.
  • OpenLDAP Faq-O-Matic: How do I determine the proper BDB/HDB database cache size? 10 February 2010 12:52 UTC www.openldap.org [Source type: FILTERED WITH BAYES]

.Distributed caching[1] uses caches spread across different networked hosts.^ WP-Cache becomes useful if your hosting server is slow, if your site has been featured on Digg or if you want to save bandwidth.
  • Best Wordpress Plugins: WP-Cache 10 February 2010 12:52 UTC www.dailyblogtips.com [Source type: General]

^ In ASP.NET we come across features like Session , Application and Cache objects, but it is important for us to understand the difference between them in order to effectively use them in web applications.
  • Cache Management in ASP.NET - CodeProject 10 February 2010 12:52 UTC www.codeproject.com [Source type: FILTERED WITH BAYES]

^ Using a local cache on the SLC Client reserves the limited bandwidth of the network segment for file writes and security requests to the file server.
  • Shared LAN Cache Datasheet 10 February 2010 12:52 UTC www.lancache.com [Source type: Reference]

The difference between buffer and cache

.The terms "buffer" and "cache" are not mutually exclusive and the functions are frequently combined; however, there is a difference in intent.^ Before we get to this there are two more cache policies to mention: write-combining; and uncacheable.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

^ However, it’s important to note that there’s still overhead with wp-cache.
  • Best Wordpress Plugins: WP-Cache 10 February 2010 12:52 UTC www.dailyblogtips.com [Source type: General]

^ Oracle’s Exadata whitepaper also notes that there is a substantial difference in the way that Oracle manages SSD inside the new flash_cache buffer area: .
  • Oracle flash_cache tips 10 February 2010 12:52 UTC www.dba-oracle.com [Source type: FILTERED WITH BAYES]

.A buffer is a temporary memory location, that is traditionally used because CPU instructions cannot directly address data stored in peripheral devices.^ When the CPU first fetches data from memory location 0, a copy of it is stored in the cache.
  • Thinking about Caching LG #102 10 February 2010 12:52 UTC linuxgazette.net [Source type: FILTERED WITH BAYES]

^ The Translation Lookaside Buffer (TLB) in the 80486 is a special-purpose cache that is used to store the most recently used mappings from virtual to physical address spaces.
  • Perils of the PC Cache 10 February 2010 12:52 UTC www.ece.cmu.edu [Source type: FILTERED WITH BAYES]

^ Often these modules are used in web applications to store data locally to save repeated and redundant expensive calls to remote machines or databases.
  • Cache::Cache - search.cpan.org 10 February 2010 12:52 UTC search.cpan.org [Source type: FILTERED WITH BAYES]

.Thus, addressable memory is used as intermediate stage.^ CacheStorageFileApcArray Uses the PHP APC extension to store array structures in memory between requests, thus improving speed.
  • eZ Components - Documentation - Tutorials 10 February 2010 12:52 UTC ezcomponents.org [Source type: FILTERED WITH BAYES]

^ CacheStorageMemcachePlain Uses the PHP Memcache extension to store cache objects in memory between requests, thus improving speed.
  • eZ Components - Documentation - Tutorials 10 February 2010 12:52 UTC ezcomponents.org [Source type: FILTERED WITH BAYES]

^ CacheStorageApcPlain Uses the PHP APC extension to store cache objects in memory between requests, thus improving speed.
  • eZ Components - Documentation - Tutorials 10 February 2010 12:52 UTC ezcomponents.org [Source type: FILTERED WITH BAYES]

.Additionally such a buffer may be feasible when a large block of data is assembled or disassembled (as required by a storage device), or when data may be delivered in a different order than that in which it is produced.^ Caching means temporary storage of data in memory that is highly-demanding and frequently used in order to accelerate performance and for quick access to various essential information.  .
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ Tests with different image sizes than the 10MB test sample may show different results.
  • Accelerate Your Mac! - G4 1MB vs 2MB Cache Size Tests 10 February 2010 12:52 UTC www.xlr8yourmac.com [Source type: FILTERED WITH BAYES]

^ A flash cache is an extension of the database buffer cache that lives on a flash disk, which is a solid state storage device that uses flash memory.
  • Oracle flash_cache tips 10 February 2010 12:52 UTC www.dba-oracle.com [Source type: FILTERED WITH BAYES]

.Also a whole buffer of data is usually transferred sequentially (for example to hard disk), so buffering itself sometimes increases transfer performance.^ Disk caching can dramatically improve the performance of applications, because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk.
  • Glossary-Computer Motherboards-Computer Terms about PC Mainboard Mother Board Motherborad-Best Computer Online Store Houston Buy Discount Prices Texas-Directron.com 10 February 2010 12:52 UTC www.directron.com [Source type: Reference]

^ When the computer asks for data from the hard disk, the hard-disk controller checks into this memory before moving the mechanical parts of the hard disk (which is very slow compared to memory).

^ The problem here is the speed of secondary storage, usually hard disks, which must be used to hold the swapped out part of the working set.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

.These benefits are present even if the buffered data are written to the buffer once and read from the buffer once.^ Using an SLC Server, data is only read once across the WAN and is written into an SLC Server where it is available to all of the SLC Clients.
  • Shared LAN Cache Datasheet 10 February 2010 12:52 UTC www.lancache.com [Source type: Reference]

^ Let's say you want to read data in and put it in a circular queue with a really simple interrupt service routine (ISR) written in Turbo C: .
  • Perils of the PC Cache 10 February 2010 12:52 UTC www.ece.cmu.edu [Source type: FILTERED WITH BAYES]

^ First Kind: Memory Caches A memory cache, or "CPU cache," is a memory bank that bridges main memory and the CPU. It is faster than main memory and allows instructions to be executed and data to be read and written at higher speed.
  • EETimes Encyclopedia 10 February 2010 12:52 UTC www.eetimes.com [Source type: FILTERED WITH BAYES]

.A cache also increases transfer performance.^ In this article we will try to look into increasing application performance by means of caching.
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ Caching gives web pages an effective way to increase performance while minimizing the use of server resources.
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ The extra 1MB of backside cache, did increase the system performance according to Norton's benchmark.
  • Accelerate Your Mac! - G4 1MB vs 2MB Cache Size Tests 10 February 2010 12:52 UTC www.xlr8yourmac.com [Source type: FILTERED WITH BAYES]

.A part of the increase similarly comes from the possibility that multiple small transfers will combine into one large block.^ Already prowlers had gotten into Star House and smoke damage had occurred as someone had set a small fire in one of the matresses in a bedroom.
  • Cache, Oklahoma 10 February 2010 12:52 UTC cacheok.com [Source type: General]

^ It's very important to keep the tag of the large enough so the block cache miss ratio is small.
  • Server Caching 10 February 2010 12:52 UTC caucho.com [Source type: FILTERED WITH BAYES]

^ Now status bar is broken into two parts - one for the regular entries and one for the stray file info.
  • CacheMonitor II For Internet Explorer 10 February 2010 12:52 UTC www.enigmaticsoftware.com [Source type: FILTERED WITH BAYES]

.But the main performance-gain occurs because there is a good chance that the same datum will be read from cache multiple times, or that written data will soon be read.^ This means that, over short periods of time, there is a good chance that the same code or data gets reused.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

^ As can be seen in the figure, the performance is the same as if the data had to be read from the main memory.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

^ Since data written into a cache eventually has to be available in the main memory, systems can either do this at the same time (write-through) or mark overwritten locations as “dirty” (write-back) and execute the write once the data is wiped out of the cache.
  • Athlon II Or Phenom II: Does Your CPU Need L3 Cache? : L3 Cache: How Important Is It To AMD? - Review Tom's Hardware 10 February 2010 12:52 UTC www.tomshardware.com [Source type: FILTERED WITH BAYES]

.A cache's sole purpose is to reduce accesses to the underlying slower storage.^ Caching means temporary storage of data in memory that is highly-demanding and frequently used in order to accelerate performance and for quick access to various essential information.  .
  • http://www.codersource.net/asp_net_caching.aspx 10 February 2010 12:52 UTC www.codersource.net [Source type: Reference]

^ There are programs for which LRU performs very poorly, especially when traversing long lists, and there are situations in which caching is slower than direct memory access.
  • cache@Everything2.com 10 February 2010 12:52 UTC everything2.com [Source type: FILTERED WITH BAYES]

^ By keeping as much of this information as possible in SRAM, the computer avoids accessing the slower DRAM. Some memory caches are built into the architecture of microprocessors.
  • Glossary-Computer Motherboards-Computer Terms about PC Mainboard Mother Board Motherborad-Best Computer Online Store Houston Buy Discount Prices Texas-Directron.com 10 February 2010 12:52 UTC www.directron.com [Source type: Reference]

.Cache is also usually an abstraction layer that is designed to be invisible from the perspective of neighbouring layers.^ The future of cache design for multi-core processors will lie in more layers.
  • Memory part 2: CPU caches [LWN.net] 10 February 2010 12:52 UTC lwn.net [Source type: FILTERED WITH BAYES]

See also

Further reading

References

  1. ^ Paul, S; Z Fei (2001-02-01). "Distributed caching with centralized control". Computer Communications 24 (2): 256–268. doi:10.1016/S0140-3664(00)00322-4. 

Simple English

Caching is a term used in computer science. A cache (pronounced "cash" /kæʃ/) uses two media; one that is slow to access, and the other that is fast. The very basic idea behind caching is to use the medium that is fast to access to have copies of data. Accessing the original data may take a long time, or it may be expensive to do (for example: the results of a difficult problem that take a long time to solve). For this reason, it is much "cheaper" to simply use the copy of the data from the cache. Put differently, a cache is a temporary storage area that has copies of data that is used often. When a copy of the data is in this cache, it is faster to use this copy rather than re-fetching or re-calculating the original data. This will make the average time needed to access the data shorter.

A buffer is very similar to a cache. It is different in that the client accessing the data in a buffer knows there is a buffer; the buffer is managed by the application. With a cache, the client accessing the data need not be aware there is a cache.

Typical computer applications access data in very similar ways. Suppose the data is structured into "blocks", which can be accessed individually. When an application accesses a block it is also very likely to access (or reference) a block that is "close" to the original block. This is known as locality of reference. There are different kinds of such "locality". Locality of reference is one of the reasons why caches work well in many areas of computing.

In order to work well, caches are small, compared to the whole amount of data. The bigger the cache, the longer it takes to lookup an entry. Bigger caches are also more expensive to build.

Contents

How caches work


A cache is a block of memory for storing data which is likely used again. The CPU and hard drive often use a cache, as do web browsers and web servers.

A cache is made up of many entries, called a pool. Each entry holds a datum (a bit of data) which is a copy of a datum in another place. Caches usually use what is called a backing store. Backing stores are slow or expensive to access, compared to the cache. A disk cache uses a hard disk as a backing store, for example. Each entry also has a little information attached, called a tag. This tag is used to find the location where the original data is stored.

Caches for reading

A client (a CPU, web browser, operating system) wants to access a bit of data, it believes to be in the backing store, it first checks to see if the datum can be found in the cache. If the data can be found in the cache, the client can use it, and no longer needs to access the backing store. This is known as a cache hit. So, for example, a web browser program might check its local cache on disk to see if it has a local copy of the contents of a web page at a particular URL. In this example, the URL is the tag, and the contents of the web page is the datum.

The other situation that can occur is that the datum with the tag cannot be found in the cache. This is known as cache miss. The datum needs to be fetched from the backing store. Usually, it is copied into the cache, so that the next time, it no longer needs to be fetched from the backing store.

The cache only has a limited size. To make room for the previously uncached entry, another cached entry may need to be deleted from the cache. Special rules are used to find the entry that should best be deleted. These rules are usually called Heuristics. Heuristics used to find the entry are called replacement policy. A very simple rule used is called Least recently used (or LRU). It simply takes the entry that was used the longest time ago. Other heuristics are listed at cache algorithm.

Caches for writing

Caches can also be used for writing data; the benefit of this is that the client can continue its operation once the entry has been written to the cache; it does not have to wait until the entry is written to the backing store.

However, the entry must be written to the backing store at some point in time. The timing when this happens is controlled by the write policy.

In a write-through cache, each entry is written to the backing store immediately, as well as being stored in cache.

The other option is to only write to cache, and write to the backing store later. This is known as write-back (or write-behind) cache. The cache marks the entries that have not yet been written to the backing store; the mark that is used is often referred to as dirty flag. Before the entries are deleted from the cache, they are written to the backing store. This is known as lazy write. A miss in a write-back cache (which requires a block to be replaced by another) will often need two memory accesses: one to get the needed datum, and another to write replaced data from the cache to the store.

The caching policy may also say that a certain datum must be written to cache. The client may have made many changes to the datum in the cache. After it is done, it may explicitly tell the cache to write back the datum.

No-write allocation is a cache policy where only reads are cached. This avoids the need for write-back or write-through caching. Writes are done to the backing store all the time.

The client is not the application that changes data in the backing store. If the data changed in the backing store, the copy in the cache will be out of date, or stale. Alternatively, when the client updates the data in the cache, copies of that data in other caches will become stale. There are special communication protocols that allow cache managers to talk to each other to keep the data meaningful. These are known as coherency protocols.

History

The word cache was first used in the context of computing in 1967, when an scientific article was prepared to be published in IBM Systems Journal. The article was about a new improvement of the memory in Model 85. Model 85 was a computer of the IBM System/360 product line. The editor of the Journal wanted a better word for high-speed buffer, used in the article. He got no input, and suggested cache, from the French cacher, meaning "to hide". The article was published in early 1968, and the authors were honored by IBM. Their work was widely welcomed and improved.Cache soon became standard usage in computer literature.[1]

Where caches are used

CPU caches

Small memories on or close to the CPU chip can be made faster than the much larger main memory. Most CPUs since the 1980s have used one or more caches. Modern general-purpose CPUs inside personal computers may have as many as half a dozen. Each cache may be specialised to a different part of the task of executing programs.

Disk caches

CPU caches are generally managed entirely by hardware, other caches are managed by a different kinds of software. The operating system usually manages a page cache in main memory. Users outside computer science usually call this cache virtual memory. It is managed by the kernel of the operating system.

Modern hard drives have disk buffers. These are sometimes called "disk cache", but this is wrong. The main function of these buffers is to order disk writes, and to manage reads. Repeated cache hits are rare, because the buffer is very small compared to the size of the hard drive.

Local hard disks are fast compared to other storage devices, such as remote servers, local tape drives, or optical jukeboxes. Using local hard disks as caches is the main concept of hierarchical storage management.

Web caches

Web browsers and web proxy servers use caches to store previous responses from web servers, such as web pages. Web caches reduce the amount of information that needs to be transmitted over the network. Information previously stored in the cache can often be re-used. This reduces bandwidth and processing requirements of the web server, and helps to improve responsiveness for users of the web.

Modern web browsers use a built-in web cache, but some internet service providers or organizations also use a caching proxy server. This is a web cache that is shared between all users of that network.

Search engines also often make web pages they have indexed available from their cache. For example, Google provides a "Cached" link next to each search result. This is useful when web pages are temporarily inaccessible from a web server.

Caching with unreliable networks

Write-through operation is common in unreliable networks (like an Ethernet LAN). The protocol used to make sure the data in the write cache makes sense when several write caches are used is very complex, in such a case.

For instance, web page caches and client-side network file system caches (like those in NFS or SMB) are typically read-only or write-through to keep the network protocol simple and reliable.

The difference between buffer and cache

Buffer and cache are not mutually exclusive; they are also often used together. The reason why they are used is different, though. A buffer is a location in memory that is traditionally used because CPU instructions cannot directly address data stored in peripheral devices. Computer memory is used as an intermediate store.

Additionally such a buffer may be feasible when a large block of data is assembled or disassembled (as required by a storage device), or when data may be delivered in a different order than that in which it is produced. Also a whole buffer of data is usually transferred sequentially (for example to hard disk), so buffering itself sometimes increases transfer performance. These benefits are present even if the buffered data are written to the buffer once and read from the buffer once.

A cache also increases transfer performance. A part of the increase similarly comes from the possibility that multiple small transfers will combine into one large block. But the main performance gain occurs because there is a good chance that the same datum will be read from cache several times, or that written data will soon be read. The only purpose of Caches is to reduce accesses to the underlying slower storage. Cache is also usually an abstraction layer that is designed to be invisible from the perspective of neighboring layers. That way, the applications or clients may not be aware that there is a cache.

References

  1. G. C. Stierhoff and A. G. Davis. A History of the IBM Systems Journal. IEEE Annals of the History of Computing, Vol. 20, No. 1 (Jan. 1998), pages 29-35. [1]


Citable sentences

Up to date as of December 29, 2010

Here are sentences from other pages on Cache, which are similar to those in the above article.








Got something to say? Make a comment.
Your name
Your email address
Message