Skip to content
noughtdigital
Menu

Insights / Engineering

SuperControl availability: cache the search, explain the failure

Separate property content from live availability, design safe cache keys and distinguish an unavailable search from a genuinely empty result.

On this page

A fast availability search needs more than a short cache lifetime. It needs a clear distinction between a property description, a recent search result and a booking the guest can actually complete. Those are different promises, and the interface should make the difference clear.

This is an integration design discussion, not a claim about a particular SuperControl account or API entitlement. The endpoints, limits and checkout options available to an operator need confirming before implementation.

Separate the content from the transaction

A cottage description can usually survive a delayed refresh. A photograph does not become misleading because it was cached an hour ago. A price for a particular arrival date is different: it belongs to a request, with a party size, length of stay and any applicable restrictions.

Keep those responsibilities separate. Let WordPress serve the editorial property page quickly. Fetch availability through a server-side integration that understands the booking system's response. Treat the final checkout as a further validation step, rather than promising that a result seen earlier has reserved the stay.

For example, a family might search for seven nights, leave the tab open and return after another guest books. A sensible interface can preserve their dates while explaining that the previous result needs checking again. Silently carrying the old price into a new journey creates confusion for both the guest and the operator.

Define what the cache key means

A cache entry should represent a complete search. Include every input that can change its meaning: property, dates, party details, currency where relevant and the integration configuration version. Normalise dates and empty values before building that key.

Missing an input can make one visitor receive another visitor's search result even when no personal data is involved. That is still a correctness failure. Write down which inputs affect the response and test combinations that differ by only one field.

WordPress transients are useful for temporary values, but their expiry is a maximum lifetime, not a guarantee that a value will remain available until then. Code must handle an early cache miss. That behaviour is documented in the WordPress Transients API.

Give failure its own interface

There are at least three outcomes worth distinguishing:

  • The search succeeded and there are suitable stays.
  • The search succeeded and there are no suitable stays.
  • The search could not be completed.

The third outcome must not look like the second. An integration timeout is not evidence that every cottage is booked. Preserve the dates, offer a retry and provide a useful contact route. Keep the diagnostic detail in operational logs rather than exposing credentials or raw provider responses to guests.

Avoid retrying every failed request immediately. Set a bounded timeout, limit repeated attempts and decide what happens when several visitors search at once. A cached response can reduce pressure, but it cannot justify describing stale availability as confirmed.

Test the transitions, not just the happy path

Use a staging integration or controlled test responses to exercise an empty result, a delayed response, an expired cache entry and a price that changes between search and checkout. Confirm that changing party size creates a fresh search and that a failed request does not replace a valid page with a blank screen.

A useful acceptance criterion is plain enough for the operator to review: guests can always tell whether they have a current result, no result or a technical problem, and they can recover without starting from scratch.

The wider architecture is covered in native WordPress around SuperControl. If the current calendar hides these distinctions, our SuperControl integration work can help make the guest journey clearer.

Keep reading

More from
the notebook.

All insights ↗

Put it into practice

Keep SuperControl. Rebuild the site around it.

Independent SuperControl website work for holiday cottages and letting agencies — search, availability, and a clean checkout handoff.