schranz/psr6-symfony-http-cache-store-analyser

分析存储在 toflar/psr6-symfony-http-cache-store HTTP 缓存存储中的哪些 URL 和标签。

dev-main 2022-10-17 13:07 UTC

This package is auto-updated.

Last update: 2024-09-17 17:23:39 UTC


README

分析存储在 toflar/psr6-symfony-http-cache-store HTTP 缓存存储中的哪些 URL 和标签。

用法

composer require schranz/psr6-symfony-http-cache-store-analyser

将你的 http_cache 目录复制到 var 目录,使其在 var/http_cache/@ 下可用。

运行分析器

vendor/bin/analyse var/http_cache

输出类似于以下内容

URL: https://example.org/
CACHE-CONTROL: max-age=240, public, s-maxage=86400
EXPIRES: Sat, 15 Oct 2022 21:56:32 GMT
X-REVERSE-PROXY-TTL: 86400
FOS-SMAXAGE-BACKUP: 240
TAGS (2): media-1,page-2
QUERIES (4):
 -
 - ?utm_campaign=some&utm_content=content&utm_medium=newsletter&utm_source=anysource
 - ?page=1
 - ?page=2
 
------------------------------------------------------------------------------------------------

URL: https://example.org/other
CACHE-CONTROL: max-age=240, public, s-maxage=86400
EXPIRES: Sat, 15 Oct 2022 21:56:32 GMT
X-REVERSE-PROXY-TTL: 86400
FOS-SMAXAGE-BACKUP: 240
TAGS (1): media-2
QUERIES (1):
 -

也可以过滤出特定的 URL

vendor/bin/analyse var/http_cache https://example.org/other

对于单个 URL,也可以通过它获取未反序列化的原始数据,这将显示所有头信息和其它信息

vendor/bin/analyse var/http_cache https://example.org/other --raw