Campaigns block

Cache duration and manual sync

Campaign data is cached in a WordPress transient so a page holding the campaigns block doesn’t call the Laposta API on every view. Cache duration defaults to 60 minutes and is configurable (1–1440 minutes) from Wynko → Settings, or via the WYNKO_CACHE_MINUTES environment variable / wp-config.php constant. The last refresh time is shown under the field.

Sync now immediately busts the cache and re-fetches campaigns from Laposta, regardless of the configured duration. Success or failure shows as an admin notice, and a row is added to the activity log — including a note when new campaigns are detected. Refreshes that happen automatically when the cache expires are logged too, worded as “Automatic sync” so you can tell the two apart.