I am just developing a sample php page.. to display tweets, for a particular hashtag…
Is there any need to cache the tweets, displayed on my site.. Because I would be only displaying the 5 recent tweets…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is it required? No, it isn’t required.
Is it a good idea? Very possibly, but that depends on what you’re trying to do!
How many users will this system have? How often will the page be loaded? How important is it to render the most recent tweets as quickly as possible?
Caching will lower the number of times you have to make a request to the Twitter API. This means two things
That’s the good news, the bad news is that
So, in short, no it isn’t required in an absolute sense. Whether or not it makes sense is up to you, based on your system. What is more important? scalability (if so then you should cache)? simplicity (if so then maybe you shouldn’t cache)? ensuring that you never miss a tweet (if so then you could cache, but would need to be smart about it)?
The choice is all yours!