Cache
Cache refers to a fast buffer memory that is used to prevent access – either for the first time or repeatedly – to a slower background medium. Once accessed, elements remain in the cache so that they are quickly available when they are needed again. In the case of cache, there is the possibility of forming them as both a software and a hardware structure in order to store copies temporarily.
The cache works in secret
The origin of the word cache can be found in French meaning a hiding place. From this it can also be deduced for the cache in computer language that it does not do its work in the foreground, but covertly in the background. The user does not know that he is accessing the cache instead of the background medium. The size and presence of the cache need not be known to the user, since the user addresses the background medium, but receives his “answer” from the cache instead of the background medium. This response turns out as it would have been expected from the background medium, i.e. data is sent or released. The cache mirrors the background medium or its resources.
Data synchronization between cache and background medium
If several devices access the background medium, not all of which use the cache, so-called incoherences can occur in which logical relationships are lost during storage. To ensure that the data image is identical to that of the cache when the background medium is accessed, it is necessary to match the data of the cache with that of the background medium in advance. The cache must also be adjusted in case of doubt if the data of the background medium is changed. With appropriate cache strategies in the form of algorithms, the data of the cache and background medium are matched by various procedures. If the cache logic does not ensure automatic synchronization, changes made in the background medium may not be detected. If the user is not sure about this, he must manually initiate a data update.
Different types of caches
A distinction is made between different types of caches. In addition to processor caches, there are also drive caches and software caches. Caches often work in several levels, in current computer processors there are usually three different ones that vary in size. In cheaper processors, the third level is often omitted, but the memory of the second level is increased. The caches are either integrated directly into the circuit boards of CPUs and hard disks or stored externally. Software caches are often created as temporary files when the hard disk serves as a faster storage medium. This includes the best-known example of a cache, the browser cache. This stores Internet pages in order to be able to read the data from the hard disk the next time it is accessed instead of downloading it again from the Internet.