The cache is an intermediate clipboard with quick access. It contains a copy of the information stored in memory with the least fast access, thus saving the user's time.
The cache is a memory with a higher access speed, designed to speed up the process of accessing data that is permanently contained in main memory. Data caching is used by hard drives, CPUs, browsers, and web servers. The cache includes a set of entries. Each of them is associated with an item or block of data. Each of the entries has an identifier that identifies the correspondence between the data in the cache and the copies in the main memory. When the client (CPU, web browser, operating system) accesses the data, the cache is first examined. If it contains a record with an identifier that matches the identifier of the required data item, then the cache data is taken. When the data items in the cache are updated, they are modified in the main memory. In the cache, where there is an immediate write, any change causes an update of the main memory data. In a write-back (write-back) cache, an update occurs on item eviction, on client request, or periodically. Several models of central processing units have their own cache to minimize the process of accessing the device's random access memory (RAM), which is slower than registers. The CPU cache is divided into several levels (up to 3). The fastest memory is considered to be the first level cache, or L1-cache. It is an integral part of the processor, since it is located on the same die with it and is part of the functional blocks. L2-cache - cache of the second level, and the corresponding speed of performance. It is usually located either on the die, like L1, or not far from the core, for example, in a processor cartridge (in slot processors). The L3 cache is the least fast and usually located separately from the CPU core, it is slower than other caches, but faster than the operative one. memory.