elgentos / magento2-apicacheindexmanagement
通过REST API无效化缓存和重新索引索引器的扩展。
1.0.0
2020-11-05 15:46 UTC
This package is auto-updated.
Last update: 2024-08-29 03:00:33 UTC
README
通过REST API无效化缓存和重新索引索引器的扩展。所有路由都是POST路由。
可以传递 {ids}
和 {skus}
,可以是逗号分隔的字符串或数组。
缓存路由
/V1/cache/flushAll
/V1/cache/flushAllInvalidated
/V1/cache/flush/{cacheType}
/V1/cache/flush/products (parameters; ids / skus)
/V1/cache/flush/categories (parameters; ids / skus)
可能的 cacheTypes
;
config
layout
block_html
collections
reflection
db_ddl
compiled_config
eav
customer_notification
full_page
config_integration
config_integration_api
config_webservice
translate
缓存类型可能更多或更少,具体取决于您的安装。查看 bin/magento cache:status
以获取完整列表。
索引路由
/V1/index/reindexAll
/V1/index/reindexAllInvalidated
/V1/index/reindex/{indexName} (optional parameters; ids / skus)
可能的 indexNames
design_config_grid Design Config Grid
customer_grid Customer Grid
catalog_category_product Category Products
catalog_product_category Product Categories
catalogrule_rule Catalog Rule Product
catalog_product_attribute Product EAV
cataloginventory_stock Stock
catalog_product_price Product Price
catalogrule_product Catalog Product Rule
catalogsearch_fulltext Catalog Search
索引可能更多或更少,具体取决于您的安装。查看 bin/magento indexer:info
以获取完整列表。
关于使用 {skus}
参数重新索引的说明:可以使用此参数与非产品索引(如 customer_grid
)结合使用。这样做将检索属于传递的SKU的产品ID,然后使用特定实体ID重新索引 客户。这不应引起任何问题,但相当无用。