J.C. Wren
unread,Nov 8, 2010, 10:34:41 PM11/8/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Perl-Cache Discuss
Let me preface this by saying if this is not the appropriate forum for
this question, please let me know.
I'm using WWW::Mechanize::Cached with CHI for some web scraping. The
majority of the web pages I fetch are cacheable, but my "top level"
pages are not. Data in the top level pages will tell me if my
individual cached pages are can be retrieved from the cache or if they
need to be re-fetched. I'm unclear from how CHI integrates with
WWW::Mechanize and WWW::Mechanize::Cached to determine if there's a
way to invalidate a page. I know the URL of the page that I need to
fetch, but I don't know how that relates to the cache until after I
fetch it.
Basically, I'm looking for the equivalent way of saying $mechanize-
>get ($url, cache => 'ignore'); or somesuch, where it will fetch the
page regardless, and update the cache with the newly fetched page. In
lieu of that, I'd settle for $mech->cache->clear ($url); or similar,
to clear only that URL from the cache so it will be re-fetched.
I spent some time hunting around trying to see if there was a more
appropriate forum, but didn't find anything (which probably means
there *is* a better place :) ).
I also write Perl like C (I'm a C programmer by trade), and while I
can read and write generic Perl, reverse engineering the fancy OO
stuff is a little beyond me. I looked at the various .pm files for
CHI, WWW::Mechanize::Cached, and a few others, and didn't find what I
think I'm looking for. So I like to think I did some research before
I went asking a question that likely has some simple answer.
Thanks,
--jc