PHPackages                             bdc/module-cachetype - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. bdc/module-cachetype

ActiveMagento2-module[Caching](/categories/caching)

bdc/module-cachetype
====================

BDCrops CacheType module for Magento 2 extensions.

201PHP

Since Sep 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bdcrops/module-cachetype)[ Packagist](https://packagist.org/packages/bdc/module-cachetype)[ RSS](/packages/bdc-module-cachetype/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

BDC\_CacheType
==============

[](#bdc_cachetype)

This module is used as creating a new cache type Magento 2 extensions. A cache type enables you to specify what is cached and enables merchants to clear that cache type using the Cache Management page in the Magento Admin.

One of the key things is to use Magento cache in a way that we can cache our rendered content on the frontend and flush only the specific blocks if needed. A custom cache type therefore enables us to specify what is cached and enables our clients to clear that specific cache type using the Cache Management option in the Administration.

Creating a new cache type in Magento is as easy as doing the following
----------------------------------------------------------------------

[](#creating-a-new-cache-type-in-magento-is-as-easy-as-doing-the-following)

- Create app/code/BDC/CacheType/registration.php &amp; insert below Code:

```

```

- Create app/code/BDC/CacheType/etc/cache.xml

```

        BDCrops Cache
        BDCrops custom cache type

```

- Create app/code/BDC/CacheType/Model/Cache/BDCropsCache.php

```
