<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Retrieve, Cache, and Display Your FeedBurner Subscriber&#160;Count</title> <atom:link href="http://davidwalsh.name/cache-feedburner/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/cache-feedburner</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Tue, 22 May 2012 05:31:04 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Luke</title><link>http://davidwalsh.name/cache-feedburner#comment-12607</link> <dc:creator>Luke</dc:creator> <pubDate>Tue, 13 Oct 2009 08:31:44 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12607</guid> <description>@Karthik: Even better! Hadn&#039;t thought of that option myself, but, I must say, a very elegant solution.</description> <content:encoded><![CDATA[<p>@Karthik: Even better! Hadn&#8217;t thought of that option myself, but, I must say, a very elegant solution.</p> ]]></content:encoded> </item> <item><title>By: Karthik Viswanathan</title><link>http://davidwalsh.name/cache-feedburner#comment-12593</link> <dc:creator>Karthik Viswanathan</dc:creator> <pubDate>Sun, 11 Oct 2009 17:37:13 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12593</guid> <description>@Luke: Instead of storing the date inside the file, why not just use the time when the file was modified?
$interval = 24 * 60 * 60;  // 24 hr * 60 min / hr * 60 sec / min
if( file_exists( $path_to_file ) &amp;&amp; ( time() - $interval ) &lt; filemtime( $path_to_file ) ) {
readfile( $path_to_file );
exit();
}// find new information and store it in the file</description> <content:encoded><![CDATA[<p>@Luke: Instead of storing the date inside the file, why not just use the time when the file was modified?<br
/> $interval = 24 * 60 * 60;  // 24 hr * 60 min / hr * 60 sec / min<br
/> if( file_exists( $path_to_file ) &amp;&amp; ( time() &#8211; $interval ) &lt; filemtime( $path_to_file ) ) {<br
/> readfile( $path_to_file );<br
/> exit();<br
/> }</p><p>// find new information and store it in the file</p> ]]></content:encoded> </item> <item><title>By: Darkimmortal</title><link>http://davidwalsh.name/cache-feedburner#comment-12573</link> <dc:creator>Darkimmortal</dc:creator> <pubDate>Fri, 09 Oct 2009 19:13:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12573</guid> <description>Memcache &gt; cache files</description> <content:encoded><![CDATA[<p>Memcache &gt; cache files</p> ]]></content:encoded> </item> <item><title>By: Nathan barnett</title><link>http://davidwalsh.name/cache-feedburner#comment-12572</link> <dc:creator>Nathan barnett</dc:creator> <pubDate>Fri, 09 Oct 2009 18:22:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12572</guid> <description>It makes sense to me to use a simple library like Cache_Lite from PEAR to handle this sort of problem. The nice thing about using Cache_Lite is that you can set an expiration time and have the natural flow of traffic decide when to repopulate the cache. It can also be automatically serialized if your saving arrays and the like. In a high traffic environment its often important to set the cache expiration to never expire and re-populate the cache via cron. I personally use a simple wrapper to use either Cache_Lite or memcached so I can easily switch between the two caching methods depending on what works best for the specific problem.http://pear.php.net/package/Cache_Lite
http://us3.php.net/memcache</description> <content:encoded><![CDATA[<p>It makes sense to me to use a simple library like Cache_Lite from PEAR to handle this sort of problem. The nice thing about using Cache_Lite is that you can set an expiration time and have the natural flow of traffic decide when to repopulate the cache. It can also be automatically serialized if your saving arrays and the like. In a high traffic environment its often important to set the cache expiration to never expire and re-populate the cache via cron. I personally use a simple wrapper to use either Cache_Lite or memcached so I can easily switch between the two caching methods depending on what works best for the specific problem.</p><p><a
href="http://pear.php.net/package/Cache_Lite" rel="nofollow">http://pear.php.net/package/Cache_Lite</a><br
/> <a
href="http://us3.php.net/memcache" rel="nofollow">http://us3.php.net/memcache</a></p> ]]></content:encoded> </item> <item><title>By: Eric Wendelin</title><link>http://davidwalsh.name/cache-feedburner#comment-12571</link> <dc:creator>Eric Wendelin</dc:creator> <pubDate>Fri, 09 Oct 2009 17:39:05 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12571</guid> <description>I know not everyone can do this, but I actually run a cron job on my server that replaces the feed count every 2 hours or so. The difference there is I make a direct replacement in my wordpress theme instead of using a text file.</description> <content:encoded><![CDATA[<p>I know not everyone can do this, but I actually run a cron job on my server that replaces the feed count every 2 hours or so. The difference there is I make a direct replacement in my wordpress theme instead of using a text file.</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/cache-feedburner#comment-12565</link> <dc:creator>David Walsh</dc:creator> <pubDate>Fri, 09 Oct 2009 15:55:10 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12565</guid> <description>I hear you Luke.  I prefer separate files for the sake of simplicity but your idea is a good one for those that would like to stick to one file.</description> <content:encoded><![CDATA[<p>I hear you Luke.  I prefer separate files for the sake of simplicity but your idea is a good one for those that would like to stick to one file.</p> ]]></content:encoded> </item> <item><title>By: Luke</title><link>http://davidwalsh.name/cache-feedburner#comment-12564</link> <dc:creator>Luke</dc:creator> <pubDate>Fri, 09 Oct 2009 15:03:45 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3775#comment-12564</guid> <description>It may be only a small concern (and an &quot;undocumented feature&quot; for some users), but this function results in a new text file being created for every day it is triggered. Whilst alot of webhosts give very generous file storage quotas, and a feed&#039;s popularity could be determined over time using these files, it seems a little wasteful.Would another option be to have a single text file (&quot;feedburner_sub_count.txt&quot;) and save into that file a serialized array containing two key-value sets keyed as &quot;date&quot; and &quot;count&quot;?Of course, this would mean that the file would have to be loaded and unserialized to get the &quot;date&quot; value and then figure out whether it needed to pull data from Feedburner again (to replace the array values and then serialize and resave the new array in the same file), but it would mean only one file.</description> <content:encoded><![CDATA[<p>It may be only a small concern (and an &#8220;undocumented feature&#8221; for some users), but this function results in a new text file being created for every day it is triggered. Whilst alot of webhosts give very generous file storage quotas, and a feed&#8217;s popularity could be determined over time using these files, it seems a little wasteful.</p><p>Would another option be to have a single text file (&#8220;feedburner_sub_count.txt&#8221;) and save into that file a serialized array containing two key-value sets keyed as &#8220;date&#8221; and &#8220;count&#8221;?</p><p>Of course, this would mean that the file would have to be loaded and unserialized to get the &#8220;date&#8221; value and then figure out whether it needed to pull data from Feedburner again (to replace the array values and then serialize and resave the new array in the same file), but it would mean only one file.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 3/7 queries in 0.007 seconds using disk: basic
Object Caching 636/636 objects using disk: basic

Served from: davidwalsh.name @ 2012-05-22 02:18:11 -->
