Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our REST web service and front-end are both on the Laravel Framework. The REST service and the front-end share a memcached server. The endpoint response and the data received on the front-end are cached. I don't want to use expiry and prefer clearing it when new data is added.

When new data is added to the back-end, Cache::flush() is called upon saving to DB to clear the cached responses of the endpoints.

Then to clear the cache of the front-end, Cache::forget('front-end-cache-key') is called.

Is there any way to improve on the solution above?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.