serverless-image-cache-breaker

command module
v0.0.0-...-3da5221 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

serverless-image-cache-breaker

Command line tool to deleted resized images - usually after an image has been updated

Origin

The serviceless-image-resizing tool (at the time of this writting) does not support breaking the resized imaged cache when an image is updated. This tool is to address that. In hindsight the effort to build this tool would have been better placed automating this functionality, but it is already done. Consider using this as a starting point whenever the time comes to automate this process.

How to Use

  1. You will need to have Go setup on your machine to build the executable. https://golang.org/doc/install
  2. Setup your local AWS configuration to point to the correct environment via aws configure
  3. Run the command, for example:
go run main.go -bucket gb-images-stg -file parking.png -ignore home

-help will provide some guidance and describe the following options.

-bucket specifies which bucket to scan. For staging you probably want gb-images-stg

-file the name of the image file whose cache you want to bust

-ignore directories you do not want to delete the image from, you will probably want to specify the source directory here, which is "home"

Upon execution you will be previed the action about the be taken, including which files will be removed and which ones will be ignored. You can safely abort at this point.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL