
The Daylife Cookbook is a collection of recipes to help you bootstrap applications that use the Daylife platform (DayPI).
These recipes come from Daylifers and the cookbook community, with entries ranging from sample code to tutorials, half baked ideas, and spotlights of the latest deployments of the DayPI.
Feel free to share, steal, criticize, applaud, and feed back!
Daylife is a perfect fit for our strategy of presenting the best and most tightly focused content, whether it is produced by us at USA TODAY or anywhere else on the Web. It helps us provide our readers with a full 360-degree view of a given topic, and adds depth and richness to niche areas important to our readers and advertisers.- Jeff Webber, SVP, USAToday.com
You guys have what seems like an amazingly powerful and easy to use API, we're pretty excited about playing with it and possibly integrating it with Hubdub. - Tom Griffith, Hubdub.com
It's amazing how simple this is to integrate into django. When a view is creating a page, it just calls a thin wrapper function that I put around the daypi module. - Bracket Boy
I found the Daylife API for PHP really easy to use, and coded something up quickly for my site, Brooklyn and Beyond - Brooklyn & Beyond
This tool makes it really easy to get a quick look or dive in deep thanks to our partner Daylife, who built a comprehensive service that yields up-to-the-minute results - The Washington Post
I was trying to make it work by using Google News RSS feeds but turned out impossible since they don't organize their data in the feeds. I now know its possible with the Daylife API - Akash Xavier
Home
| Get Credentials for the DayPI
| Daylife.com
| FAQ's
| Terms of Use
© 2008 Daylife, Inc.

With Caching
The C# .NET client implementing caching: http://cookbook.daylife.com/sites/default/files/DayLifeAPI_DotNet_with_caching.zip
// DayRequest uses a threadsafe internal cache. What this means is that the response for each API request is cached on
// the first request and returned from cache the second time around. the benefits are:
// 1) Wastefull api calls are not made for the same request again and again
// 2) response from cache is heaps faster
// Note the internal cache behaviour is defined by three constants in DayLifeAPI.DayRequest Class:
// 1) CacheRequestsForMinutes
/// Items expire from the cache after the number of minutes specified in MaxItemsInCache
/// Set this depending on the minimum freshness you want for your data.
// 2) MaxItemsInCache
/// The cache will hold a maximum number of items as specified by MaxItemsInCache
/// The more items you have in cache the greater the memory footprint.
/// If you are likely to make 100 unique requests many times during the time in CacheRequestsForMinutes above
/// then set this to 100
// 3) PruneCacheEveryNumRequests
/// The cache will be pruned (expired and excess items removed) every X number of requests
/// Where X is PruneCacheEveryNumRequests.
/// If you make say 100 requests in 10 minutes then set this to 100
// To be adjusted these to FIT the applications usage patterns.