---
title: Price Cache
description: "PriceFetchWP was built to efficiently fetch and store external prices without sending unnecessary requests to external websites. To accomplish this, PriceFetchWP uses WordPress **transients**, which provide temporary cached price data that can be reused until the configured cache time expires.…"
url: "https://pricefetchwp.com/documentation/price-cache/"
updated: "2026-09-09"
category: Core Configuration
---

# Price Cache

PriceFetchWP was built to efficiently fetch and store external prices without sending unnecessary requests to external websites.

To accomplish this, PriceFetchWP uses WordPress **transients**, which provide temporary cached price data that can be reused until the configured cache time expires.

Caching is optional, but strongly recommended for production websites.

1. [- Why This Matters](#why-this-matters)
   1. [Example:](#example)
2. [- Cache Layer System](#cache-layer-system)
   1. [How It Works](#how-it-works)
3. [– How Price Caching Works](#how-price-caching-works)
4. [– WooCommerce Price Storage](#woocommerce-price-storage)
5. [– Fetching Behavior](#fetching-behavior)
   1. [First Applicable Request](#first-applicable-request)
   2. [Subsequent Requests](#subsequent-requests)
   3. [After Cache Expiration](#after-cache-expiration)
6. [– Cache Duration](#cache-duration)
7. [– Global vs. URL Entry Cache](#global-vs-url-entry-cache)
8. [– Disabling Cache for Testing](#disabling-cache-for-testing)
9. [– Purging Price Cache](#purging-price-cache)
   1. [Purge All Price Cache](#purge-all-price-cache)
   2. [Purge Cache for One URL Entry](#purge-cache-for-one-url-entry)
   3. [Important](#important)
10. [– Failed Fetch Caching](#failed-fetch-caching)
11. [– Benefits of Price Caching](#benefits-of-price-caching)
    1. [• Improved Performance](#eb-table-content-19)
    2. [• Reduced External Requests](#eb-table-content-20)
    3. [• Reduced Proxy and API Usage](#eb-table-content-21)
    4. [• Better Scalability](#eb-table-content-22)
    5. [• Less Chance of Rate Limiting](#eb-table-content-23)
12. [– When Prices Update](#when-prices-update)
13. [– Common Questions](#common-questions)
    1. [The external price changed. Why is mine not updating?](#the-external-price-changed-why-is-mine-not-updating)
    2. [Can I force a price refresh?](#can-i-force-a-price-refresh)
    3. [Should I disable caching?](#should-i-disable-caching)
    4. [What cache time should I use?](#what-cache-time-should-i-use)
    5. [Does purging the cache delete my WooCommerce product price?](#does-purging-the-cache-delete-my-woocommerce-product-price)
    6. [Can I use PriceFetchWP on large sites?](#can-i-use-pricefetchwp-on-large-sites)
14. [Next Steps ───](#eb-table-content-32)

## - Why This Matters

Caching your prices is crucial. Without price caching, every applicable page load could trigger a new request to the external website.

### Example:

- You have 5,000 external product listings
- You get 100 visits *per product*, *per day*

This would result in:

👉 **500,000 external requests *per day***

This would be inefficient and could contribute to:

- Slower price-loading performance
- Increased load on your WordPress server
- Increased load on external websites
- Proxy or Affiliate API usage costs
- Rate limiting
- Blocked requests

Caching allows PriceFetchWP to reuse a recently retrieved price instead of requesting the same external price on every visit.

---

## - Cache Layer System

PriceFetchWP stores **transients**(temporary cache) for each incoming product price. A transient is a temporary cache stored in WordPress. Aside from transient cache, if using WooCommerce, the prices will save into your product too - which is the default way WooCommerce saves price on products. So, if you were to stop using PriceFetchWP, all prices saved on WooCommerce products would stay in place until they are updated again.

### How It Works

- Price is fetched
- Stored per ID
- Reused for the set duration
- After expiration, it fetches again

---

## – How Price Caching Works

When PriceFetchWP successfully retrieves a price, it can temporarily store that result in cache (a WordPress transient).

The general process is:

```
Price requested
      ↓
Valid cached price available?
      ↓
YES → Use cached price
NO  → Fetch external price
      ↓
Store successful result in cache
```

The cached result is reused until it expires (then re-fetched) or is manually purged.

PriceFetchWP creates cache data based on the external price request and its relevant configuration so that prices from different external sources are handled separately.

---

## – WooCommerce Price Storage

WooCommerce products technically have an additional persistent price layer.

When PriceFetchWP successfully retrieves a WooCommerce product price, the price is also saved into the WooCommerce product itself using the normal WooCommerce price fields.

This means the WooCommerce product price and the PriceFetchWP transient cache serve different purposes:

- **PriceFetchWP transient** — temporary fetch cache
- **WooCommerce product price** — saved product pricing data

If PriceFetchWP were disabled, prices already saved to WooCommerce products would remain in WooCommerce until something else updates them.

This is also why the **Show old price (if already exists)** setting can continue displaying a previously stored WooCommerce price if a later external fetch fails.

---

## – Fetching Behavior

### First Applicable Request

If no previous cached price exists:

1. PriceFetchWP identifies the external price source
2. The external price is fetched
3. A valid price is extracted
4. The result is cached for the configured duration
5. The price is displayed or saved according to your PriceFetchWP settings

The first uncached request is typically slower than a cached request because PriceFetchWP must contact the external source.

### Subsequent Requests

While a valid cached result exists:

- The cached price is used
- A new external price request is not required
- The price will be returned much faster

### After Cache Expiration

When the cache transient expires, PriceFetchWP does **not** automatically perform a background fetch simply because the timer ended.

Instead, the **next applicable request** (when the product or page is viewed) triggers a fresh external price fetch.

The new result can then be cached again for the configured duration.

---

## – Cache Duration

PriceFetchWP allows you to control how long fetched prices remain cached.

The default global Price Cache for a new or unset configuration is:

```
4 hours
```

A longer cache time means:

- Fewer external requests
- Faster cached price responses
- Less Proxy or Affiliate API usage
- External price changes may take longer to appear

A shorter cache time means:

- External prices are checked more frequently
- More external requests are made
- Proxy or API usage may increase
- Price changes can be detected sooner

Choose a cache duration that balances freshness with request volume.

---

## – Global vs. URL Entry Cache

PriceFetchWP supports both:

- **Global Price Cache**
- **Per-URL Entry Price Cache**

The global setting provides the default cache duration for your external price sources.

A specific URL Entry can override that value through:

**Advanced Options → Price Cache**

This is useful when different external websites need different refresh schedules.

For example:

```
Global Price Cache
→ 4 hours

Website A
→ Use global setting

Website B
→ 12 hours

Website C
→ 1 day
```

If a URL Entry does not have its own cache override, the global Price Cache value is used.

---

## – Disabling Cache for Testing

You can set the Price Cache value to:

```
0
```

to disable normal price caching.

This is useful while testing selectors or troubleshooting a URL Entry because PriceFetchWP will not keep reusing a previously cached successful price.

With caching disabled, external requests can occur much more frequently.

For this reason, a value of `0` is best treated as a **testing or troubleshooting setting**, not the normal production configuration.

We strongly recommend using a normal cache duration on a live website.

---

## – Purging Price Cache

PriceFetchWP includes built-in cache purge controls.

You normally do not need a separate transient-management plugin to refresh PriceFetchWP pricing, but it could be useful during testing if you need to manually delete separate transients.

There are two ways to purge price cache:

### Purge All Price Cache

Beside the global Price Cache setting, use: **Purge All** to remove PriceFetchWP price caches across your site.

This is useful when you intentionally need all external prices to be checked again. Purge all is usually not recommended because all product prices will need re-fetched.

### Purge Cache for One URL Entry

You can also purge cached prices associated with an individual external domain through that URL Entry’s: **[Advanced Options](https://pricefetchwp.com/documentation/advanced-options/)**

This is generally preferable when only one external website needs to be refreshed. This only purges cached prices for that domain only.

### Important

Purging a cache does **not** immediately retrieve a new price.

It removes the existing cached result.

The next applicable PriceFetchWP request will then perform a fresh fetch.

Cache purging is generally most useful for:

- Testing
- Troubleshooting
- Selector changes
- External-site changes
- Situations where you know cached pricing needs to be refreshed early

There is normally no need to repeatedly purge caches during everyday use.

---

## – Failed Fetch Caching

PriceFetchWP may also temporarily cache certain failed or no-price results.

This helps prevent a broken or unavailable external source from being requested repeatedly on every visitor request.

For example, if an external page currently cannot provide a usable price, temporarily remembering that failure can prevent dozens or hundreds of immediate repeat requests.

Not every type of failure is cached.

Certain temporary connection, provider, API, or account-related failures may intentionally skip failure caching so PriceFetchWP can try again on a later applicable request.

When a failure result is cached, PriceFetchWP can continue recognizing that the most recent fetch was unsuccessful until the cached failure expires or is cleared.

If **Show fetch error icon to admins** is enabled, administrators may also see the front-end warning:

```
Price fetch failed. Check logs
```

when applicable.

---

## – Benefits of Price Caching

### • Improved Performance

Cached prices can be displayed much faster because PriceFetchWP does not need to wait for the external website on every request.

### • Reduced External Requests

Caching greatly reduces repeated requests to the same external product pages.

### • Reduced Proxy and API Usage

If a URL Entry uses a paid Proxy service or Affiliate API, caching can also reduce the number of requests sent to that provider.

### • Better Scalability

Caching becomes increasingly important as your site grows.

A site with thousands of products can still avoid unnecessary repeated fetches because each valid cached price is reused until its cache duration expires.

### • Less Chance of Rate Limiting

Sending fewer requests to an external source may also reduce the chance of triggering rate limits or automated blocking.

---

## – When Prices Update

A new external fetch generally occurs when:

- No valid cached result currently exists
- The previous cache has expired and another applicable request occurs
- The relevant cache was manually purged
- Caching is disabled for testing

The external price is **not** automatically fetched at the exact moment a transient expires.

A new fetch happens when PriceFetchWP next needs that price.

For WooCommerce, a successfully fetched price can then also update the saved WooCommerce product price.

---

## – Common Questions

### The external price changed. Why is mine not updating?

A valid cached price may still be active.

PriceFetchWP continues using that cached result until:

- The cache expires
- The cache is manually purged
- Caching is disabled

Once the cache is no longer valid, the next applicable request can retrieve the latest external price.

If you need faster price changes, you can shorten the global cache duration or configure a shorter cache for that specific URL Entry.

---

### Can I force a price refresh?

Yes. PriceFetchWP includes built-in cache purge controls.

You can:

- Use **Purge All** beside the global Price Cache setting (typically not recommended)
- Purge cached prices for an individual URL Entry through **[Advanced Options](https://pricefetchwp.com/documentation/advanced-options/)**

After purging the cache, visit or otherwise trigger the applicable PriceFetchWP price request.

The next request will perform a fresh fetch.

For most situations, purging the individual URL Entry cache is preferable to clearing every PriceFetchWP cache on the site.

---

### Should I disable caching?

Disabling price cache is **not recommended**.

A cache value of:

```
0
```

can be useful while testing or troubleshooting, but it can cause PriceFetchWP to contact the external source much more frequently.

For a live website, using a normal cache duration is strongly recommended.

---

### What cache time should I use?

There is no single cache duration that is right for every website.

The PriceFetchWP global default is:

```
4 hours
```

You may want a shorter duration for websites where prices change frequently.

You may want a longer duration when:

- Prices rarely change
- The external website is slow
- The website rate limits requests
- A paid Proxy or Affiliate API is being used
- Reducing external requests is more important than near-real-time pricing

Per-URL Entry overrides allow you to use different schedules for different sources.

---

### Does purging the cache delete my WooCommerce product price?

Purging the PriceFetchWP transient cache is separate from the price already stored in the WooCommerce product.

Clearing a transient does not by itself remove the WooCommerce product’s saved price.

The next applicable PriceFetchWP request can perform a fresh external fetch and update the product again.

---

### Can I use PriceFetchWP on large sites?

Yes. Caching is especially important for larger websites.

The more products and visitors your site has, the more valuable it becomes to reuse cached pricing rather than performing a new external request every time a price is needed.

Longer cache durations generally mean fewer external requests.

---

## Next Steps ───

Now that you understand how PriceFetchWP caching works, continue with:

- **[Delay Price](https://pricefetchwp.com/documentation/delay-price-page-load-behavior/)** **(Page Load Behavior)**
- **[WooCommerce Settings](https://pricefetchwp.com/documentation/woocommerce-settings/)**
- **[URL Entries](https://pricefetchwp.com/documentation/url-entries/)**
- **[Advanced Options](https://pricefetchwp.com/documentation/advanced-options/) (Per URL Entry)**
- **[Testing a URL Entry](https://pricefetchwp.com/documentation/testing-a-url-entry/)**
- **[Logging & Debugging](https://pricefetchwp.com/documentation/logging-debugging/)**
