Plugin Directory


Ignore:
Timestamp:
11/07/2026 08:10:59 AM (15 hours ago)
Author:
mdraabiul
Message:

Release 0.2.0 - lazy loading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cache-shark/trunk/src/PageCache.php

    r3785734 r3789168  
    6666                        $status = (int) http_response_code();
    6767                        if ( '' !== $target && self::should_store( (string) $buffer, $status, headers_list() ) && ! ( defined( 'DONOTCACHEPAGE' ) && DONOTCACHEPAGE ) ) {
     68                                // Optimise only pages that are being cached. The visitor who triggers the
     69                                // cache write gets exactly the page every later visitor will get.
     70                                $out = Optimizer::run( (string) $buffer );
    6871                                CacheStore::write_file(
    6972                                        $target,
    70                                         $buffer . "\n<!-- Cached by Cache Shark on " . gmdate( 'Y-m-d H:i:s' ) . " UTC -->\n"
     73                                        $out . "\n<!-- Cached by Cache Shark on " . gmdate( 'Y-m-d H:i:s' ) . " UTC -->\n"
    7174                                );
     75                                return $out;
    7276                        }
    7377                } catch ( \Throwable $e ) {
Note: See TracChangeset for help on using the changeset viewer.