nginx-cache-purge

A bash script for deleting items from Nginx cache

  • 所有者: perusio/nginx-cache-purge
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Bash script for deleting an item or set of items from Nginx cache

Introduction

This simple script removes an item or set of items from
Nginx cache, be it
fastcgi or
proxy.

It accepts a
grep pattern
as argument to search for cached items in the given cache directory.

This script uses grep
basic
regular expressions. Pressuposes the use of
GNU grep.

The script requires rw (read-write) access to the cache
directory.

Usage

  1. Delete foobar.css from the /var/cache/nginx/baz cache.

    nginx-cache-purge "foobar.cs" /var/cache/nginx/baz
    
  2. Delete all JPEG files from the /var/cache/nginx/img cache.

    nginx-cache-purge "\.jpe*g" /var/cache/nginx/img 
    

Installation

  1. Clone the repo:

    git clone git://github.com/perusio/nginx-cache-purge.git
    
  2. Place the script in a convenient place.

  3. Done.

See also

There's another script
on github for inspecting cache items.

主要指标

概览
名称与所有者perusio/nginx-cache-purge
主编程语言Shell
编程语言Shell (语言数: 1)
平台
许可证
所有者活动
创建于2011-12-29 06:21:12
推送于2017-05-21 20:57:05
最后一次提交2015-09-14 12:48:47
发布数0
用户参与
星数249
关注者数14
派生数57
提交数13
已启用问题?
问题数2
打开的问题数2
拉请求数1
打开的拉请求数3
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?