Cache Bins in Drupal

Modified on Fri, 2 Aug at 2:19 PM

This article details how the Schema App Drupal module caches markup for Drupal pages. For a general overview of the Drupal module, see Schema App Drupal Deployment Overview.


Cache Bins


The Schema App Drupal module creates a 'cache bin' to store schema markup for your pages. The implementation is different for each version of the module, but in both cases, when a page is loaded, the module will check if the cache bin contains a key for this URL and will retrieve it from our CDN if it does not.


Each item in the cache bin contains a key (based on the page URL), value (schema markup retrieved from our CDN), and expiry time (the default is 24 hours, but this can be configured in the module's settings).


Drupal 10/11


The Schema App Drupal 10/11 module creates a cache bin name 'schemaapp_cache' to store markup.


Caching in Drupal 10/11 uses the Drupal Cache API, where the contents of the cache bin are retrieved using the CacheBackendInterface, using set() to store markup in the cache bin and get() to retrieve cached markup.


The CacheBackendInterface is an abstraction over many types of implementations of a cache. By default, Drupal 10/11 uses a database implementation to store cache bins as database tables, but there are many other implementations available such as Varnish, Memcache, and Redis.

  • An overview of Drupal 10/11 caching can be found here: Cache API.
  • Recommendations for clearing the Drupal 10/11 cache can be found here: Clearing the Cache.

Database table replication


If you have a strategy for replicating database tables for your Drupal site, we do not recommend including the Schema App Drupal module's cache bin tables. This cached schema markup will still be available to fetch from Schema App's CDN, which is replicated over multiple regions.


In the event of rebuilding the cache for your Drupal site, there would be a small impact on the initial page load speed when first retrieving the markup from our CDN & caching the markup in the cache bin for each page.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article