The module works well apart from the fact that the cache is never expiring. I need to clear cache or resave the block in order for new images to come through.
The overall website cache is set to 1 hour and the caching time of the instagram block is set to 24 hours. Nevertheless, the images never change over days/weeks unless done manually.

Any thoughts on this?

Comments

Fernly created an issue. See original summary.

  • ipwa committed 525abc2a on 3.0.x
    feat: #3132406 Cache time is not respected
    
    By: ipwa
    
ipwa’s picture

Three fixes applied:

  • getCacheMaxAge() — now overridden to return the configured cache time in seconds. This is the canonical fix and what Drupal's block system actually reads.
  • Data cache — the Instagram API response is now stored in Drupal's data cache bin with an explicit TTL (time() + max_age). This means Instagram is only hit when the data actually expires, not on every render cache miss.
  • Error return cache metadata — the "could not retrieve" and "no posts" error messages now have max_age = 60 (1 minute) so a temporary Instagram outage doesn't get permanently cached.
ipwa’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

ipwa’s picture

Version: 8.x-1.0 » 3.0.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.