I am trying to use caching in SLIM 4 installation, which is based on Akismet-setup. So all of my request handlers are class type. There are a few requests that take considerably time (like 5-10 seconds) and I’d prefer to get them mostly from cache so that they normally would be fast. The data doesn’t change too often so caching seems to be a viable alternative.
I have added slim/httpcache to my installation, but as a new SLIM user I can’t figure out how to implement the actual caching to the app. I have tried to google the web for examples or a tutorial, but - alas - haven’t encountered so far anything my intelligence would convert as a working code…
Could anyone point me to the right direction, which allows me to use caching either on a select calls or even with all calls.
I haven’t added anything fancy in the implementation, so adding as an example the caching to akismet default handler (or as a general cache in the middleware) would probably give me enough hints to handle this from there on.
Otherwise Slim seems a very adequate framework (at least) for the backend API!