@@ -485,7 +485,7 @@ public function feedzy_rss( $atts, $content = '' ) {
485
485
}
486
486
$ attributes .= 'data- ' . esc_attr ( $ key ) . '=" ' . esc_attr ( $ val ) . '" ' ;
487
487
}
488
- $ lazyload_cache_key = md5 ( sprintf ( 'feedzy-lazy-%s ' , ( is_array ( $ feed_url ) ? implode ( ', ' , $ feed_url ) : $ feed_url ) ) );
488
+ $ lazyload_cache_key = md5 ( sprintf ( 'feedzy-lazy-%s-%d-%d ' , ( is_array ( $ feed_url ) ? implode ( ', ' , $ feed_url ) : $ feed_url ), ( ! empty ( $ sc [ ' max ' ] ) ? $ sc [ ' max ' ] : 1 ), ( ! empty ( $ sc [ ' offset ' ] ) ? $ sc [ ' offset ' ] : 0 ) ) );
489
489
$ content = get_transient ( $ lazyload_cache_key );
490
490
491
491
// the first time the shortcode is being called it will not have any content.
@@ -577,7 +577,7 @@ public function feedzy_lazy_load( $data ) {
577
577
$ content = $ this ->render_content ( $ sc , $ feed , $ feed_url , '' );
578
578
579
579
// save the content as a transient so that whenever the feed is refreshed next, this stale content is displayed first.
580
- $ lazyload_cache_key = md5 ( sprintf ( 'feedzy-lazy-%s ' , ( is_array ( $ feed_url ) ? implode ( ', ' , $ feed_url ) : $ feed_url ) ) );
580
+ $ lazyload_cache_key = md5 ( sprintf ( 'feedzy-lazy-%s-%d-%d ' , ( is_array ( $ feed_url ) ? implode ( ', ' , $ feed_url ) : $ feed_url ), ( ! empty ( $ sc [ ' max ' ] ) ? $ sc [ ' max ' ] : 1 ), ( ! empty ( $ sc [ ' offset ' ] ) ? $ sc [ ' offset ' ] : 0 ) ) );
581
581
set_transient ( $ lazyload_cache_key , $ content , apply_filters ( 'feedzy_lazyload_cache_time ' , DAY_IN_SECONDS , $ feed_url ) );
582
582
583
583
wp_send_json_success ( array ( 'content ' => $ content ) );
0 commit comments