Skip to content

Settings

The Settings page is organised into three cards: Activation, General, and Cache backend. Use the Save changes button in the top right to persist your edits — unsaved changes are kept until you navigate away.

Activation

SettingDescriptionDefault
Activate Image ProxyRoutes external product images through this server. When off, images load directly from their origin and expose visitor IPs.Off
Also apply in WP adminEnables the proxy for pages rendered inside /wp-admin. Most setups only need it on the frontend. Disabled while the master switch is off.Off

Linking to this page from the Dashboard activation banner anchors directly to this card and briefly highlights it so the onboarding path is obvious.

When you change either activation toggle and save, the ASA2 template cache is flushed automatically. This avoids a window during which cached HTML still contains stale image URLs (origin URLs after turning the proxy on, or proxy URLs after turning it off). The flush only triggers when the activation flag actually flipped — saving the page with the toggles unchanged does not flush the cache, and other settings on this page (cache backend, lifetime, URL slug) never trigger it.

The success banner reflects what happened:

Settings saved. ASA2 template cache flushed because activation changed.

Or, when the activation toggles were not changed:

Settings saved.

General

SettingDescriptionDefault
Use cacheTurn caching on or off. When off, every proxy request goes through the full pipeline (fetch → decode → encode) and the origin is contacted every time. Only useful for debugging.On
Cache lifetime (minutes)How long a cache entry remains valid before the proxy refetches the image from the origin. Stored as an integer.360 (6 hours)
URL slugUsed as the last path segment of proxy URLs (e.g. https://example.com/asa2img/…). Letters, digits, and hyphens only. Changing this invalidates all previously emitted URLs until pages are re-rendered.asa2img

Cache backend

The plugin detects which cache backends are available on this server at runtime. The card opens with an Available backends on this server panel that lists every backend with a green check (supported) or grey minus (not available) and tags the currently selected one.

Image Proxy Settings — Cache backend (Filesystem)

Cache mode

Pick one of three backends. See Cache Backends for a deeper comparison of when to pick which.

Filesystem

The default backend — works on any host.

FieldDescription
Filesystem directoryAbsolute path where cached images are stored. Defaults to the system temp directory. Must live under either wp-content or the system temp directory — other paths are rejected with "Cache directory must live under wp-content or the system temp directory."

A validity badge below the field reports the live state:

  • GreenDirectory exists and is writable.
  • RedDirectory is not writable — falls back to NullCache.

Redis

Image Proxy Settings — Cache backend (Redis)

Hidden unless the phpredis PHP extension is loaded. If you select Redis on a host without the extension, a yellow alert appears: "The Redis PHP extension is not installed on this server." In that state the pipeline falls back to NullCache and nothing is cached.

FieldDefaultNotes
Redis host127.0.0.1Hostname or IP address of the Redis server.
Redis port6379TCP port.
Redis passwordemptyWhen a password is already stored, the field shows the placeholder (stored — leave blank to keep). Submit blank to keep the existing value; submit an empty string explicitly to clear it. The current value is never returned by the REST API.

Memcached

Image Proxy Settings — Cache backend (Memcached)

Hidden unless the ext-memcached PHP extension is loaded. If unsupported, the same yellow alert pattern applies.

FieldDefault
Memcached host127.0.0.1
Memcached port11211

Memcached caveat

Memcached cannot enumerate its keys, so Purge Cache flushes the entire Memcached server (including data unrelated to the proxy) and the statistics panel shows zero entries and zero bytes. Use Memcached only when you understand this trade-off — for shared Memcached instances, prefer Redis or Filesystem.

ASA2 - The Amazon Affiliate Plugin for WordPress