module WCC::Contentful::Store
The “Store” is the middle layer in the WCC::Contentful
gem. It exposes an API that implements the configured content delivery strategy.
The different content delivery strategies require different store implementations.
- direct
-
Uses the
WCC::Contentful::Store::CDNAdapter
to wrap theContentful
CDN, providing an API consistent with the other stores. Any query made to theCDNAdapter
will be immediately passed through to the API. TheCDNAdapter
does not implement index because it does not care about updates coming from the Sync API. - lazy_sync
-
Uses the
Contentful
CDN in combination with an ActiveSupport::Cache implementation in order to respond with the cached data where possible, saving your CDN quota. The cache is kept up-to-date via the SyncEngine
and theWCC::Contentful::SyncEngine::Job
. It is correct, but not complete. - eager_sync
-
Uses one of the full store implementations to store the entirety of the
Contentful
space locally. All queries are run against this local copy, which is kept up to date via the SyncEngine
and theWCC::Contentful::SyncEngine::Job
. The local store is correct and complete.
The currently configured store is available on WCC::Contentful::Services.instance
.store
@api Store
Constants
- PRESETS
- SYNC_STORES