Token导航 LogoToken导航

Agent Skill · 研究检索

magento-indexing-caching(magento 索引缓存)

magento-indexing-caching 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

magento-indexing-caching 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,028。

总安装 465周安装 19GitHub Stars 19下载 150核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:magento-indexing-caching(magento 索引缓存)
来源仓库:https://github.com/finsilabs/awesome-ecommerce-skills
仓库路径:skills/magento-indexing-caching
安装命令:
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill magento-indexing-caching
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill magento-indexing-caching

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。magento-indexing-caching 属于研究检索类 Skill,可作为该场景下的辅助能力补充。适合根据关键词或任务场景快速定位候选结果。可结合来源仓库和 README 核验具体用法。安装前建议确认权限范围和维护状态。注意是否会触发联网或命令执行。

来源仓库内路径:skills/magento-indexing-caching

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill mag…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

magento-indexing-caching 怎么安装?

在终端执行 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill magento-index…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

magento-indexing-caching 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

magento-indexing-caching 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

magento-indexing-caching 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

magento-indexing-caching 用的人多吗?

公开数据是累计安装 465 次,近一周安装 19 次,下载 150 次,GitHub 19 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

magento-indexing-caching 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
magento-indexing-caching

magento 索引缓存 · 本页

46519需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Magento Indexing and Caching

Overview

Magento's performance architecture relies on two distinct layers: indexers that pre-compute denormalized data (product prices, search indexes, category paths) into flat tables, and the Full-Page Cache (FPC) that stores complete rendered HTML pages. Varnish is the recommended FPC backend for production, replacing Magento's built-in file-based cache. Redis is the recommended backend for application cache, session storage, and the default cache (block HTML, config, layout). Misconfigured or stale indexes are one of the most common causes of incorrect pricing and product visibility issues.

When to Use This Skill

  • When products appear with wrong prices or are invisible after catalog updates
  • When implementing Varnish for the first time on a Magento production server
  • When diagnosing slow category page loads caused by on-the-fly price calculation
  • When configuring Redis for Magento's session and block cache storage
  • When setting up cache invalidation after catalog or CMS updates via Magento's cache tags
  • When managing indexer schedules on large catalogs (> 50,000 products) to prevent full reindex locking

Core Instructions

  1. Understand Magento's indexers and their modes # List all indexers and their status bin/magento indexer:info bin/magento indexer:status # Example output: # catalog_category_product Category Products valid Update on Save # catalog_product_category Product Categories valid Update on Save # catalog_product_price Product Price invalid Update by Schedule # catalogsearch_fulltext Catalog Search valid Update by Schedule # catalogrule_product Catalog Rule Product invalid Update on Save Set all production indexers to Update by Schedule mode to prevent checkout blocking: bin/magento indexer:set-mode schedule catalog_category_product bin/magento indexer:set-mode schedule catalog_product_price bin/magento indexer:set-mode schedule catalogsearch_fulltext bin/magento indexer:set-mode schedule catalog_product_flat bin/magento indexer:set-mode schedule catalog_category_flat # Verify modes bin/magento indexer:show-mode
  2. Manage indexers and partial reindexing # Reindex a single indexer (less disruptive than full reindex) bin/magento indexer:reindex catalog_product_price # Reindex all (avoid on production during business hours) bin/magento indexer:reindex # Reset indexer to "invalid" to force next scheduled run bin/magento indexer:reset catalog_product_price # Check mview (materialized view) changelog tables — lists pending rows to process bin/magento indexer:show-changelog For very large catalogs, use parallel indexing: # app/etc/env.php — enable parallel processing # In Admin → System → Index Management → Indexers → Configure # Or via config: bin/magento config:set dev/grid/async_indexing 1 <?php // app/etc/env.php return [//... 'indexer' => ['batch_size' => ['catalog_product_price' => ['simple' => 200, 'configurable' => 50], 'catalogsearch_fulltext' => ['simple' => 500],],],];
  3. Configure Varnish as Full-Page Cache # In Admin → System → Configuration → Advanced → System → Full Page Cache # Set Caching Application: Varnish Cache # Export Varnish configuration: bin/magento varnish:vcl:generate --export-version=6 --output-file=/etc/varnish/magento.vcl Key sections of the generated VCL to understand: # /etc/varnish/magento.vcl (excerpts from generated config) sub vcl_recv {# Do not cache if private cookie is set (logged-in customer) if (req.http.cookie ~ "X-Magento-Vary=") {# Magento sets this cookie to vary cache by context (customer group, currency) # The cookie value changes only when the context changes — not per session} # Strip _ga, fbclid, utm_* params from cache key to prevent cache fragmentation set req.url = regsuball(req.url, "(\?|&)(utm_[^&]+|fbclid|gclid|mc_[^&]+)(&|$)", "\1");} sub vcl_hash {# Include Magento's context cookie in the cache hash if (req.http.cookie ~ "X-Magento-Vary=") {hash_data(regsub(req.http.cookie, ".*X-Magento-Vary=([^;]+).*", "\1"));}} sub vcl_backend_response {# Respect Magento's Cache-Control headers if (beresp.http.Cache-Control ~ "no-store") {set beresp.uncacheable = true; set beresp.ttl = 120s;} # Strip Set-Cookie on cacheable responses if (beresp.ttl > 0s) {unset beresp.http.set-cookie;}}
  4. Configure Redis for application cache and sessions <?php // app/etc/env.php — Redis cache and session configuration return ['cache' => ['frontend' => ['default' => ['id_prefix' => 'b0c_', 'backend' => 'Magento\\Framework\\Cache\\Backend\\Redis', 'backend_options' => ['server' => '127.0.0.1', 'database' => '0', 'port' => '6379', 'password' => '', 'compress_data' => '1', 'compression_lib' => 'gzip', 'persistent' => 'mgto_cache',],], 'page_cache' => ['id_prefix' => 'b0c_', 'backend' => 'Magento\\Framework\\Cache\\Backend\\Redis', 'backend_options' => ['server' => '127.0.0.1', 'database' => '1', // Separate DB for FPC 'port' => '6379', 'compress_data' => '0', // FPC data is already compressed HTML],],],], 'session' => ['save' => 'redis', 'redis' => ['host' => '127.0.0.1', 'port' => '6379', 'password' => '', 'timeout' => '2.5', 'persistent_identifier' => 'mgto_sessions', 'database' => '2', // Separate DB for sessions 'compression_threshold' => '2048', 'compression_library' => 'gzip', 'log_level' => '1', 'max_concurrency' => '6', 'break_after_frontend' => '5', 'max_lifetime' => '7200', 'disable_locking' => '1', // Improves performance but reduces session safety],],];
  5. Implement cache tag invalidation for custom modules Magento uses cache tags to selectively invalidate cached pages when data changes. Custom modules should tag and clean caches properly: <?php // Declare cache tags in your block/model namespace MyVendor\CustomModule\Block; use Magento\Framework\View\Element\Template; use Magento\Framework\DataObject\IdentityInterface; class CustomProductWidget extends Template implements IdentityInterface {private array $productIds = []; public function getIdentities(): array {// Return cache tags so Magento invalidates this block when any of these products change $tags = [\Magento\Catalog\Model\Product::CACHE_TAG]; foreach ($this->productIds as $id) {$tags[] = \Magento\Catalog\Model\Product::CACHE_TAG. '_'. $id;} return $tags;}} <?php // In your observer or command — flush only relevant pages after product update namespace MyVendor\CustomModule\Observer; use Magento\Framework\Event\ObserverInterface; use Magento\Framework\App\Cache\TypeListInterface; use Magento\PageCache\Model\Cache\Type as PageCacheType; class ProductSaveObserver implements ObserverInterface {public function __construct(private readonly TypeListInterface $cacheTypeList, private readonly \Magento\Framework\App\Cache\Tag\Resolver $tagResolver) {} public function execute(\Magento\Framework\Event\Observer $observer): void {$product = $observer->getEvent()->getProduct(); // Invalidate only pages tagged with this product's cache tag // Varnish will purge via PURGE request using X-Magento-Tags-Pattern header $this->cacheTypeList->invalidate(PageCacheType::TYPE_IDENTIFIER);}}

Examples

Diagnose index lag causing wrong prices

# Check if mview changelog has pending rows
bin/magento indexer:show-changelog

# If catalog_product_price has > 0 pending rows, prices are stale
# Run the indexer to catch up
bin/magento indexer:reindex catalog_product_price

# Check cron_schedule table for missed cron jobs (should run indexers every minute)
bin/magento cron:run --group index &
# Or manually via:
mysql -u root -e "SELECT job_code, status, finished_at FROM magento.cron_schedule WHERE job_code LIKE '%index%' ORDER BY finished_at DESC LIMIT 20;"

Warm FPC after deployment

#!/bin/bash
# scripts/warm-cache.sh — warm the FPC after deploy
set -e

MAGENTO_BASE_URL="https://www.mystore.com"
SITEMAP_URL="$MAGENTO_BASE_URL/sitemap.xml"

echo "Flushing Magento caches..."
bin/magento cache:flush

echo "Warming FPC via sitemap..."
# Download sitemap and curl each URL with a warm-cache header
curl -s "$SITEMAP_URL" | \
  grep -oP '<loc>\K[^<]+' | \
  head -500 | \
  xargs -P 10 -I {} curl -s -o /dev/null -w "%{http_code} {}\n" \
    -H "X-Warm-Cache: 1" {}

echo "Cache warming complete."

Best Practices

  • Always use Update by Schedule mode in production — Update on Save reindexes synchronously during admin saves, causing timeouts on large catalogs
  • Separate Redis databases for cache, FPC, and sessions — using database 0 for everything causes key conflicts and makes it impossible to flush only one type
  • Tag custom blocks with IdentityInterface — this ensures Varnish and Magento's FPC invalidate the right pages when your data changes
  • Monitor indexer changelog table sizes — a catalog_product_price_cl table with millions of rows indicates cron is not running; fix cron before the table size causes reindex timeouts
  • Use bin/magento cache:clean vs cache:flush — clean removes only invalid cache entries (safe); flush nukes everything including other framework caches sharing the same Redis
  • Set distinct id_prefix per environment — staging and production can share a Redis server if each has a unique prefix, preventing cache poisoning
  • Test Varnish with curl -I and X-Cache header — a HIT response confirms Varnish is serving from cache; MISS means it's hitting Magento for every request

Common Pitfalls

ProblemSolution
Products invisible or wrong price after importRun bin/magento indexer:reindex after bulk imports — programmatic product saves don't always trigger indexer if using ResourceModel\Product::save directly
Varnish serving stale pages for logged-in customersEnsure X-Magento-Vary cookie is in the Varnish VCL hash; logged-in customers get a different vary value that bypasses the shared cache
Redis running out of memorySet maxmemory-policy allkeys-lru in redis.conf for cache databases; for session database use noeviction to prevent silent session loss
FPC not invalidating after product saveCheck that Varnish's PURGE ACL allows requests from the Magento server's IP; test with curl -X PURGE http://varnish-ip/
Full reindex takes hours and locks tablesEnable indexer batch sizes in env.php and run with --mode realtime for partial reindexing; schedule during off-peak windows
Cron indexers not runningCheck var/log/magento.cron.log for errors; verify the system crontab entry runs bin/magento cron:run every minute as the web server user

Related Skills

  • @magento-module-development
  • @magento-graphql
  • @magento-multi-store
  • @caching-strategies
  • @infrastructure-performance

平台分布

Codex

36.39%
按下载量换算55

Claude

29.99%
按下载量换算45

Cursor

19.34%
按下载量换算29

Gemini CLI

9.19%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills