Wednesday, December 20, 2023

Cache

Cache (pronounced kash)

(1) A hiding place (historically most associated with one in the ground) for ammunition, food, treasures etc.

(2) Anything so hidden (even if not necessarily in a cache).

(3) In computing (hardware & software), a temporary storage space or memory permitting fast access (as opposed to a call to a hard drive).  The term “cache storage” is still sometimes used.

(4) In Alaska and Northern Canada, a small shed elevated on poles above the reach of animals and used for storing food, equipment etc.

(5) To put in a cache; to conceal or hide; to store.

1585–1595: From the French cache, a noun derivative of cacher (to hide), from the unattested Vulgar Latin coācticāre (to stow away (originally, “to pack together”), frequentative of the Classical Latin coāctāre, (constrain) the construct being coāct(us) (collected) (past participle of cōgere (to collect, compel)), + -icā- (the formative verb suffix) + -re (the infinitive suffix).  Cache is a noun & verb, cacheability is a noun, cacheable is an adjective and cached & caching are verbs; the noun plural is caches.

The bottom half of a bikini can be thought of as a cache-sexe.  Lindsay Lohan demonstrates, Los Angeles, 2009.

English picked up the word from French Canadian trappers who used it in the sense of “hiding place for stores” but more pleasing still was the early twentieth century French noun cache-sexe (slight covering for a woman's genitals), the construct being cacher "to hide" + sexe (genitals).  Cache can be confused with the (unrelated though from the same Latin source) noun “cachet”.  Dating from the 1630s, in the sense of “a wax seal”, it was from the sixteenth century French cachet (seal affixed to a letter or document)", from the Old French dialectal cacher (to press, crowd), from the Latin coāctāre (constrain).  In the eighteenth century the meaning (via the French lettre de cachet (letter under seal of the king) shifted to “(letter under) personal stamp (of the king)”, thus the idea of a cachet coming by the mid-1800s to be understood as “a symbol of prestige”.  In that sense it has since the mid-twentieth century become entrenched in English though not all approved.  Henry Fowler (1858–1933) was about as fond of foreign affectations as he was of literary critics and in his A Dictionary of Modern English Usage (1926) he maintained: (1) the only use English had for “cachet” was as the apothecaries used it to describe “a capsule containing a pharmaceutical preparation”, (2) the more common “stamp” & “seal” were preferable for stuff stuck on envelopes and (3) phrases like “a certain cachet” or “the cachet of genius” were clichés of literary criticism and the critics were welcome to them.  Interestingly, In English, cachet did find a niche as a (wholly un-etymological) variant of cache: it means “a hidden location from which one can observe birds while remaining unseen”.  The origins of this are thought to allude to such places being hiding places (thus a cache) and cramped (the irregular –et in the (cach)et a use of the suffix –et which was from the Middle English -et, from the Old French –et & its feminine variant -ette, from the Late Latin -ittus (and the other gender forms -itta & -ittum).  It was used to form diminutives, loosely construed.

Cachet is pronounced ka-shey or kash-ey (the French being ka-she) but some sites report there are those who use one of the English alternatives for cache; that’s obviously wrong but appears to be rare.  What is common (indeed it seems to have become the standard in some places) is kay-sh, something which really annoys the pedants.  However a case can be made that kash should remain the standard while kay-sh should be used of everything particular to computers (disk cache, web cache et al), rather along the lines of the US spelling “program” being adopted when referring to software in places where programme is used for all other purposes.  Both seem potentially useful points of differentiation although while there a chance for splitting the pronunciation of cache, it’s unlikely the Americans will take to programme.

Lindsay Lohan’s shoe stash.  She also has a handbag stash.

Cache may also be related to stash which is similar in meaning but conveys usually something quite disreputable, the verb dating from circa 1795 as was underworld slang meaning “to conceal or hide, the related forms being stashed & stashing.  The noun also was criminal slang meaning “hoard, cache, a collection of things stashed away” and was first observed in 1914 and, via popular literature, picked up in general English, often with the specific sense of “a reserve stock”.  The origin is unknown origin but most etymologists seem to have concluded it was a blend of either stick + cache or stow + cache.  Following the US use in the early 1940s (where most such adaptations began), stash is now most associated with drug slang (one’s stash of weed etc) but Urban Dictionary lists more recent co-options such as a stash being variously (1) “someone with whom one is involved but one has no intention of introducing to one’s friends or family”, (2) as “porn stash” an obscure (or even hidden) place among the directory tree on one’s computer where one keeps one’s downloaded (or created) pornography (analogous with the physical hiding places when such stuff was distributed in magazines), (3) a variety of the mechanics or consequences of sexual acts and (4) certain types of moustache (sometimes with modifiers).  Of the latter, as 'stache & stache, it’s long been one of the apheretic clippings of moustache ('tache, tache & tash the others).

So a cache is a hoard, stockpile, reserve or store of stuff, sometimes secreted from general view and often untouched for extended periods.  In modern computing, a cache is a busy place when much of what is stored is transitory and while there are now many variations of the caching idea (CPUs (Central Processing Units) & GPUs (Graphics Processing Units) have for years had multiple internal caches), the classic example remains the disk cache, a mechanism used temporarily to store frequently accessed or recently used data from a storage device, such as a HDD (Hard Disk Drive) or SSD (Solid-State Drive).  What the cache does is make things respond faster because accessing anything from the static electricity of a cache is many times faster than from a piece of physical media; fast, modern SSDs have reduced the margin but it still exists and at scale, remains measurable.

Caches started modestly enough but in the early days of PCs there were few means more effective at gaining speed unless you were a megalomaniac able to run a 4 MB (megabyte) RAMDrive (and such freaks did exist and were much admired).  However, caches grew with LANs (Local Area Networks), WANs (Wide Area Networks) and then the Web and as internet traffic proliferated, the behavior of caches could create something like the bottlenecks they were created to avoid.  Thus something of a science of cache management emerged, necessitated because unlike many aspects of computer design, the problems couldn’t always be solved by increasing size; beyond a certain point, not only did the law of diminishing returns begin to apply but if caches were too big, performance actually suffered: they are a Goldilocks device.

New problems begat new jargon and the most illustrative was the “cache stampede”, a phenomenon witnessed in massively parallel computing systems handing huge volumes of requests to cached data.  For a cache to be effective, it need to hold those pages which need most frequently to be accessed but it’s there’s an extraordinarily high demand for a single or a handful of URLs (Universal Resource Locator (the familiar address.com etc), if the requested page(s) in cache expire, as there is a “stampede” of demand, what can happen is the system becomes an internal loop as multiple servers simultaneously attempt to render the same content and in circumstances of high ambient load, congestion begins to “feed on itself”, shared resources become exhausted because they can’t be re-allocated as long as demand remain high.

Another attractive term is cache-buster, software which prevents duplication within a cache.  It’s an important part of the modern model of internet commerce which depends for much revenue flow on the alignment of the statistics between publishers and marketers.  All a cache buster does is prevent a browser from caching the same file twice so if a user “accepts cookies”, the browser will track and save them, enabling the user to access the previously cached site whenever they return which is good for speed but, it there have been changes to the site, user may not be able to see them.  The cache buster’s solution is simple brute-force: a random number appended to the ad-tag which means new ad-calls no longer have a link to the tag, compelling the browser to send a new request to the origin server.  This way, website owners can be assured the number of impressions registered by a marketing campaign will be very close to correct.

Intel i486 CPUs (left) and Asus ROG Matrix GeForce RTX 4090 Platinum 24G GPU (right).

Progress: In 1989, Intel released the 80486 CPU (the name later standardized as i486 because pure numeric strings are almost impossible to trademark), acclaimed by the press at the time as “phenomenally faster” and while that may have been hyperbolic, in the brief history of the PC, impressionistically, few new chips “felt” so much faster.  Part of that was attributable to a Level 1 instruction cache (8-16 KB depending on the version).  By 2023, nVidia’s GeForce RTX 4090 GPU included a L1 cache with 128 KB per SM (Streaming Multiprocessor) and a L2 cache with 72 MB.

No comments:

Post a Comment