A cache is a specific segment of memory that attempts to enhance performance by putting away data that either has been recently accessed or is expected to be accessed soon.
Flushing gives you a chance to manage storage to ensure that storage memory, and different assets are utilized proficiently. Flushing remove all things in cache, including those that have not yet terminated.
For example, in a retail application, cached data may never again be used, when the customer has logged off
The steps in magento 2 cache flushing
- Login to your magneto 2.x admin panel
- Click system at left hand side bottom corner of your dashboard menu
- Click Cache management
- Click Flush magento cache button
“voila it’s done”
Magento 2 has the following cache types
Cache Type Description
Configuration | Magento collects configuration from all modules, merges it, and saves the merged result to the cache. This cache also contains store-specific settings stored in the file system and database.
Clean or flush this cache type after modifying configuration files. |
Layout | Compiled page layouts (that is, the layout components from all components).
Clean or flush this cache type after modifying layout files. |
Block HTML output | HTML page fragments per block.
Clean or flush this cache type after modifying the view layer. |
Collections data | Results of database queries.
If necessary, Magento cleans up this cache automatically, but third-party developers can put any data in any segment of the cache. Clean or flush this cache type if your custom module uses logic that results in cache entries that Magento cannot clean. |
DDL | Database schema.
If necessary, Magento cleans up this cache automatically, but third-party developers can put any data in any segment of the cache. Clean or flush this cache type after you make custom changes to the database schema. (In other words, updates that Magento does not make itself.). |
Entity attribute value (EAV) | Metadata related to EAV attributes (for example, store labels, links to related PHP code, attribute rendering, search settings, and so on).
You should not typically need to clean or flush this cache type. |
Page cache | Generated HTML pages
If necessary, Magento cleans up this cache automatically, but third-party developers can put any data in any segment of the cache. Clean/flush this cache type after modifying code level that affects HTML output. It’s recommended to keep this cache enabled because caching HTML improves performance significantly. |
Reflection | Removes a dependency between the Webapi module and the Customer module. |
Translations | Merged translations from all modules. |
Integration configuration | Compiled integrations.
Clean or flush this cache after changing or adding integrations. |
Integration API configuration | Compiled integration APIs. |
Web services configuration | Web API structure. |
Read more: How to purge varnish cache remotely when using cloudflare
Read more: Amazon Elastic Cache : Make your applications faster
Read more : Magento Speed Optimization.