3

I have made a framework for a project. The project does a medium amount of query requests (but the traffic it will be getting will make it more per user). The views are mixed HTML and PHP.

Just looking for the best minimalist ways on how I should go about caching my view files (the controller uses output buffering so maybe I can leverage that?) and cache my queries. I've looked around but only could find big/bloated libraries or very crude methods on doing these things, something I'm not interested in.

Thanks for the help!

1 Answer 1

2

You can try to cache complicated views like lists etc.

An example: You have a category overview, it shows the name of all categories and the count of items in it. You can cache this view as static html as long as no new item has been inserted or deleted in any category.

So every time you create a new item or delete one you have to regenerate this view.

Since items are created less often than being viewed, you can save many queries ;)

PS: You don't have to use files for that, you could use memcache (google for it)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.