How to configure the update interval for Yahoo! Pipes? - yahoo-pipes

I am creating some RSS using Yahoo! Pipes, but the update interval is too long. How can i change it? If it is not possible to change, how long it is exactly?

The Pipes docs says it honors the standard HTTP expiration headers, so it depends on your sources' headers.
However, there is also a minimum interval, this post claims it's around 10 minutes.

Related

Does okhttp enforce any sort of limit on the size of a request body?

I've looked through the okhttp documentation looking for an answer to this question, but have come up empty so far. Does the okhttp library have an enforceable limit on the size of a request body? I'm using version 4.9.1 in case that matters.
Thanks in advance
There's no limit. Practically speaking you'll want to choose a size that can be transmitted in a minute or less, otherwise timeouts get difficult and you'll waste work if things fail and need to be restarted.

How to control amp-live-list caching?

I'm implementing an amp-live-list for our site and I have everything set up. Everything looks good when I go the AMP version of my live blog pages (where the element is implemented) however when I run the URL through Google, i.e. https://www.google.com/amp/www.example.com/test-live-blog/amp, it can take up to 3-4 minutes for an update to come through even though polling is set to the minimum 15 seconds.
The delay directly on the AMP URL, i.e. https://www.example.com/test-live-blog/amp, is around the expected 15 second mark. Does Google AMP have a separate cache or request header it uses? What response header can I set to try and reduce this time to live for the AMP version of my document? I can't find any suitable documentation for these kinds of caching questions. Thanks.
The Google AMP Cache respect the max-age header, as specified in the docs:
The cache follows a "stale-while-revalidate" model. It uses the origin's caching headers, such as Max-Age, as hints in deciding whether a particular document or resource is stale. When a user makes a request for something that is stale, that request causes a new copy to be fetched, so that the next user gets fresh content.
The Google AMP cache, including the case where the cache ping is used, has some latency which is on the order of minutes and I have seen as low as a minute.

Net::HTTP.get_response timeout

Does Net::HTTP.get_response timeout after some number of seconds?
If it does not, is there a way for me to add a timeout?
There doesn't seem to be any method nor attributes for either Net:HTTP.get_response and/or Net:HTTP.get_print as per latest documentation. There is a nice blog post that documents the basics for setting the timeouts though.

How long should static file be cached?

I'd like to set browser caching for some Amazon S3 files. I plan to use this meta data:
Cache-Control: max-age=86400, must-revalidate
that's equal to one day.
Many of the examples I see look like this:
Cache-Control: max-age=3600
Why only 3600 and why not use must-revalidate?
For a file that I rarely change, how long should it be cached?
What happens if I update the file and need that update to be seen immediately, but its cache doesn't expire for another 5 days?
Why only 3600 ?
Assumingly because the author of that particular example decided that one hour was an appropiate cache timeout for that page.
Why not use must-revalidate ?
If the response does not contain information that is strictly required to follow the cache rules you set, omitting must-revalidate could in theory ensure that a few more requests are delivered through the cache. See this answer for details, the most relevant part being from the HTTP spec:
When a cache has a stale entry that it would like to use as a response
to a client's request, it first has to check with the origin server
(or possibly an intermediate cache with a fresh response) to see if
its cached entry is still usable.
For a file that I rarely change, how long should it be cached?
Many web performance advices says to set a very far into the future cache expiration, such as a few years. This way, the client browser will only download the data once, and subsequent visits will be served from the cache. This works well for "truly static" files, such as Javascript or CSS.
On the other hand, if the data is dynamic, but does not change too often, you should set an expiration time that is reasonable based for your specific scenario. Do you need to get the newest version to the customer as soon as it's available, or is it okay to serve a stale version ? Do you know when the data change ? Etc. An hour or a day is often appropiate trade-offs between server load, client performance, and data freshness, but it depends on your requirements.
What happens if I update the file and need that update to be seen immediately, but its cache doesn't expire for another 5 days?
Give the file a new name, or append a value to the querystring. You will of course need to update all links. This is the general approach when static resources need to change.
Also, here is a nice overview of the cache control attributes available to you.

Force content update to cloudfront, without using invalidate

I am using cloud front as CDN. Is there a way to force a content update? I have a file on my origin server which I've updated with a new version (same name, new date time stamp). But when I check it in cloudfront, its still the old file.
I have seen this thread which suggest one way as invalidate, but I don't want to do that because its an overhead I think and there can be maximum 3 invalidation request running at a time. I read that cloudfront is supporting dynamic content using query parameters, can I make use of it somehow to force cloudfront to pull the latest content from the distribution server.
The first one is as you mentioned to explicitly call invalidate(). They do have a 3 invalidation request limit, but each request can contain up to 1000 objects which in most cases are fairly enough. It usually takes 10 - 15 mins according to the doc, but my experience of this is rather fluctuated (can take up to 30min in some cases).
The other approach of dynamic parameter is definitely doable and which is a preferred way. What you need to is append a timestamp param at the end of you link's end. Something like:
http://www.example.com/img/logo.png?timestamp=123456789
Once you updated your logo.png, change the timestamp to the new one:
http://www.example.com/img/logo.png?timestamp=223456789
And cloudFront will be able to distinguish these two and pick the right one.
So yes, I believe your analysis is on the right track.

Resources