This is a little bit of a tutorial and a little bit of an experiment as you never really know how long it takes for Flickr to make a change available. In this case it was about 4 minutes between uploading the photo to Flickr and having it appear in a gallery on the site.
When you first create a slideshow or gallery, you are often at the same time adding photos to Flickr and tagging them. However, the photos do not appear immediately on your WordPress blog.
There are two reasons for this: firstly Flickr has many servers and it takes a finite amount of time for your new photos to appear on all the servers (and we can’t do much about that) and secondly, there is WordPress feature that caches the RSS feed. The WordPress caching means that it will only read Flickr every 12 hours or so unless you clear the cache.
Now what you can do is go to Slickr Flickr Admin Settings and press the Clear RSS Cache button.
However to save you having to do this, Slickr Flickr Pro has a new parameter setting:
[code]
cache="off"
[/code]
In the video example below I display a gallery, add a photo to Flickr, and have the gallery updated without having to clear the cache manually
Example of Clearing the Cache Automatically
[code]slickr-flickr type="gallery" tag="atlantis" use_key="y" cache="off"[/code]
[email protected] says
Hello–Is there any downside to using this feature?? The post was almost 2 years ago and described as an “experiment”. Hope the results are good before I finish building I want to add in any codes I need to.
Russell says
Hi Gail,
The ‘experimental’ aspect was really to do with the timing – Flickr is not consistent as to how often it synchronizes its servers.
Yes, there is a downside and hence you should use the feature sparingly. If you have a very popular site then you may run foul of Flickr’s API guidelines by generating too many queries per second – see Limits section on http://www.flickr.com/services/developer/api/. Flickr can cancel /expire your API key if they deem the use excessive.
I would recommend that you only use this feature when covering live events and you want to show latest photos as soon as possible. And always remember to switch the cache back on for that slideshow/gallery once the event is over.
Furthermore it would make sense for me to make the function operate more intelligently. Rather than forcing photos to be fetched from Flickr every time, I will implement a limiter so that it will only break the cache at most once a minute. This will prevent the issue with a busy site generating too many queries.
Thank you for prompting this train of thought. I will add this enhancement in the next release. Also I will parameterize the ‘breaking’ of the cache so you can control the maximum frequency at which the cache is automatically cleared. From the next release onwards setting cache=”off” will in fact set the cache_expiry=”60″. By the way, the default cache expiry for WordPress is 12 hours or cache_expiry=43200.
The next release will be on Saturday 20th October 2012.