V
V
Vasily G.2015-04-06 23:56:14
Yii
Vasily G., 2015-04-06 23:56:14

How to optimize your work with Instagram?

There is a site written in Yii, almost the entire site rests on the Instagram API: there is a feed of photos, subscribers, who is subscribed to, my photos, etc.
Every time you go to some page of the site, you connect to Instagram, install a token, determine the current user, and then there is a request to obtain the necessary information (news, subscribers ...), because of this, the site opens for a long time, it turns out it is in every action reconnects.
How to reduce the load on the server, increase the processing speed? Can move requests to instagram and processing to the user part?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vyachin, 2015-04-08
@hebrian_vasyl

I would advise not to request an access token every time, but to store it in the session. If there is no token in the session or it is not valid, we reconnect, otherwise we use the one that is available to obtain the necessary information.

I
Igor Kalashnikov, 2015-04-07
@zo0m

You can pull everything into an Angular application, which will already do all the dirty work and not keep extra connections. And let some REST send separate requests to you.

A
Artyom, 2015-09-08
@DeOne

Cache the received data. Let's say 5 minutes. Memcached is here to help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question