mjordan / islandora_whole_object

Renders various representations (JSON-LD, etc.) of an Islandora object.
GNU General Public License v2.0
3 stars 3 forks source link

Add block caching #16

Closed kayakr closed 3 years ago

kayakr commented 4 years ago

e.g. in IslandoraWholeObjectFedoraBlock

  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    $node = \Drupal::routeMatch()->getParameter('node');
    return Cache::mergeTags(parent::getCacheTags(), ["node:{$node->id()}"]);
  }

I found I was getting reports of RDF from fcrepo that related to a different object.

mjordan commented 4 years ago

Tested and works for me; if you have time, pull in master, test, and close. Thanks very much!

mjordan commented 3 years ago

This seems to be working. If not, please reopen.