# Invalidation

4 major events can trigger content extraction:

  1. Api Request

    MarfeelInsight offers an invalidation API.

  2. Compilation

    In a local environment, when placed inside the tenant repository folder, call glue invalidate:section any time to refresh the content

    In our servers, when a tenant is newly created, an observer is placed on its file system. Changes to the definition.json file trigger a new compilation.

  3. Job

    A scheduler triggers regular invalidations for non-MarfeelPress tenants

  4. End-user request

    A reader who accesses a marfeelized page which is "expired" triggers an invalidation.

Those events are listed in the Details Enum (opens new window) and set accordingly when a request reaches Gutenberg.

TIP

If the ItemService receives an invalidation request for a "fresh" article, it does not reach the Boilerpipe: a new extraction does not take place.

# Schedulers

Each non-MarfeelPress tenant has active cron jobs triggering regular invalidations of marfeelized section pages.

Only the section pages declared in the definition.json file are regularly invalidated.

The recurrence period of these jobs depend on the section itself and the tenant’s Marfeel configuration. The default values are:

  • Home sections: every 3 minutes.
  • Other sections: every 60 minutes.

# API

To force the update of Marfeel's version for an article or section page, an API is available. It is the fastest possible way to invalidate content on a Marfeel site.

Tenants can integrate calls to this API with their CMS, in order to always trigger immediate invalidations for new or modified content.

# Timing

During an invalidation through the API, Marfeel will:

  • Obtain the content from the tenant's servers and transform it into a consumable content by Marfeel. The duration of this may vary very much depending on the tenant’s response time, going from 1 second to more than 30 in some cases.
  • Purge all Marfeel caches so the new content is spread through the network. This takes around 10 seconds.

Therefore, the average time for section invalidations using the Invalidations API is around 30 seconds.