Skip to content

Fixed cache time calculation for shortcode#1280

Open
girishpanchal30 wants to merge 2 commits into
developmentfrom
bugfix/1279
Open

Fixed cache time calculation for shortcode#1280
girishpanchal30 wants to merge 2 commits into
developmentfrom
bugfix/1279

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

Summary

Calculate the cache time and set the transient for the lazy-loaded content based on the shortcode attributes and feed URL.

Check before Pull Request is ready:

Closes #1279

@girishpanchal30
girishpanchal30 requested a review from Copilot July 14, 2026 11:31
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Jul 14, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Jul 14, 2026
@pirate-bot

pirate-bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 6edb2ac is ready 🛎️!

Note

You can preview the changes in the Playground

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns lazy-loaded shortcode output caching with the configured refresh interval.

Changes:

  • Reuses a helper for lazy cache keys.
  • Calculates transient lifetime from refresh.
  • Supports singular and plural refresh units.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
includes/abstract/feedzy-rss-feeds-admin-abstract.php Updates lazy cache lifetime and refresh parsing.
phpstan-baseline.neon Removes resolved static-analysis exceptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread includes/abstract/feedzy-rss-feeds-admin-abstract.php Outdated
Comment on lines +609 to +610
$cache_time = $this->calculate_cache_time( $sc['refresh'] );
set_transient( $lazyload_cache_key, $content, apply_filters( 'feedzy_lazyload_cache_time', $cache_time, $feed_url ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lazy shortcode output cache ignores the refresh interval for up to 24 hours

4 participants