02.06.2013 Views

XML Demystified

XML Demystified

XML Demystified

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 8 Really Simple Syndication (RSS)<br />

The skipHours child element requires at least one hour child element and can<br />

have up to 24 hour child elements. Each hour child element must contain an integer<br />

that represents the hour you want the aggregator to skip the update. The hour child<br />

element uses the 24-hour clock where 0 is one o’clock in the morning and 23 is<br />

midnight.<br />

Here’s how to tell the aggregator to skip the updates after normal business<br />

hours:<br />

<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

17<br />

18<br />

19<br />

20<br />

21<br />

22<br />

23<br />

<br />

<br />

The ttl (time to live) element specifies the number of minutes that the RSS<br />

document has before the copy of the RSS document in cache is refreshed. The<br />

RSS document is placed in cache (memory) the first time it’s loaded. During the<br />

session, the RSS document is displayed from cache when subsequent requests are<br />

made for the RSS document.<br />

Retrieving the RSS document from cache rather than from the server provides a<br />

quick response; however, the contents of the copy of the RSS document in cache<br />

can easily be outdated. In order to avoid this problem you use the ttl element to set<br />

the number of minutes that the RSS document can remain in cache; after this<br />

expires, the RSS document must be refreshed from the server.<br />

Let’s say that your RSS documents almost always remains unchanged for two<br />

hours. Therefore, you can set the ttl element to 120 minutes. This means that the<br />

aggregator is asked to refresh its copy of the RSS document that’s stored in cache<br />

every 120 minutes.<br />

115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!