In computing, cache refers to a fast buffer memory that helps to avoid (repeated) accesses to a slow background medium or costly recalculations. Data that has already been loaded or generated once remains in the cache so that it can be retrieved more quickly from it when it is needed later. Also, data that is likely to be needed soon can be retrieved in advance from the background medium and made available in the cache for the time being (read-ahead).

Caches can be designed as hardware or software structures.

Cache is a loanword from English. It has its origin in the French cache, which actually means hiding place. The name illustrates the fact that the cache and its substitute function for the background medium addressed are usually hidden from the user. The user of the background medium does not need to know the size or function of the cache, because the cache is not addressed directly. The user "addresses" the background medium, but instead the cache "responds" - in exactly the same way as the background medium would have responded, i.e. supplied data. Because of the invisibility of this intermediate unit, it is also referred to as transparency. Practically, it is a mirrored resource that is processed/used very quickly as a substitute for the original.

If other devices besides the one using the cache access the background medium, inconsistencies can occur. In order to be able to access an identical data image, it is necessary to transfer the cache changes to the background medium before accessing it. Cache strategies such as write-through or write-back are practicable here. In extreme cases, a complete "cache flush" must be performed.

In addition, the cache may need to be informed that data on the background medium has changed and its content is no longer valid. If the cache logic does not ensure this, the disadvantage is that changes made in the meantime in the background medium or in the computational program are not detected. If changes are suspected, or to ensure that the current status is taken into account, the user must explicitly initiate a cache update.