Plugin Directory


Ignore:
Timestamp:
10/01/2026 12:31:38 PM (4 weeks ago)
Author:
shiponkarmakar
Message:

Release v1.0.24

File:
1 edited

Legend:

Unmodified
Added
Removed
  • optimazz/trunk/includes/Modules/Cache/Storage/DiskStorage.php

    r3651494 r3723128  
    4242                        return array(
    4343                                'files' => 0,
     44                                'pages' => 0,
    4445                                'bytes' => 0,
    4546                        );
    … …  
    4849                $files = 0;
    4950                $bytes = 0;
     51                // A page (one URL) is stored as several variants in its own folder —
     52                // desktop/mobile, http/https, query strings. "Cached pages" counts the
     53                // pages, so it matches what the preloader reports; 'files' is kept for
     54                // the raw variant count.
     55                $dirs  = array();
    5056                $it    = new \RecursiveIteratorIterator(
    5157                        new \RecursiveDirectoryIterator( $root, \FilesystemIterator::SKIP_DOTS )
    … …  
    6066                                ++$files;
    6167                                $bytes += (int) $file->getSize();
     68                                $dirs[ $file->getPath() ] = true;
    6269                        }
    6370                }
    … …  
    6572                return array(
    6673                        'files' => $files,
     74                        'pages' => count( $dirs ),
    6775                        'bytes' => $bytes,
    6876                );
Note: See TracChangeset for help on using the changeset viewer.