API Caching


We are a team developing an API for debates application, using Phalcon DevTools (1.3.2 ALPHA 1) we are following Micro App Collection as showed in your Doc. Regarding this, I have a couple of questions as following:

  1. Do I need to cache the API requests? if yes How can I cache these requests?
  2. Do you think that Memcache can do the magic for me? if yes how can implement that via Phalcon?
  3. Do you think that using both Phalcon cache besides Memcache will lead to better performance?

edited Jul '14

That depends on which kind of application you are creating, but a cache would improve the performance of your application, so you have to find out strategies to implement caching on several levels/places.

Memcache is an option, but it would be a better option if you have several machines executing your application.

Caching, as I mentioned before, means cache several things, output of views, meta-data, annotations, sessions, resultsets, etc. Not sure what kind of application you are creating, hope it helps.