From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: [PATCH] Fix URL documentation Date: Thu, 23 Sep 2010 11:46:51 +0200 Message-ID: <1285235211-15680-1-git-send-email-julien@danjou.info> References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1285235238 32613 80.91.229.12 (23 Sep 2010 09:47:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2010 09:47:18 +0000 (UTC) Cc: Julien Danjou To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 23 11:47:17 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OyiOa-0004tX-7C for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 11:47:16 +0200 Original-Received: from localhost ([127.0.0.1]:45782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyiOZ-0002Mh-Iy for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 05:47:15 -0400 Original-Received: from [140.186.70.92] (port=39096 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyiOP-0002LO-Lc for emacs-devel@gnu.org; Thu, 23 Sep 2010 05:47:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyiOO-0000F6-Fc for emacs-devel@gnu.org; Thu, 23 Sep 2010 05:47:05 -0400 Original-Received: from prometheus.naquadah.org ([212.85.154.174]:60939 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyiOO-0000Et-AZ; Thu, 23 Sep 2010 05:47:04 -0400 Original-Received: by mx1.naquadah.org (Postfix, from userid 8) id 43BD65C0C3; Thu, 23 Sep 2010 11:47:02 +0200 (CEST) Original-Received: from keller.adm.naquadah.org (unknown [IPv6:2a01:e35:2e39:e900:222:faff:fe9d:ce44]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id D8B0F5C0C3; Thu, 23 Sep 2010 11:46:59 +0200 (CEST) Original-Received: from jd by keller.adm.naquadah.org with local (Exim 4.72) (envelope-from ) id 1OyiOJ-00045V-51; Thu, 23 Sep 2010 11:46:59 +0200 X-Mailer: git-send-email 1.7.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130655 Archived-At: Signed-off-by: Julien Danjou --- doc/misc/url.texi | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/doc/misc/url.texi b/doc/misc/url.texi index a6bbf0b..dcb8f5c 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -731,14 +731,6 @@ directory to store the cache files. It defaults to sub-directory @file{cache} of @code{url-configuration-directory}. @end defopt -@c Fixme: function v. option, but neither used. -@c @findex url-cache-expired -@c @defopt url-cache-expired -@c This is a function to decide whether or not a cache entry has expired. -@c It takes two times as it parameters and returns non-@code{nil} if the -@c second time is ``too old'' when compared with the first time. -@c @end defopt - @defopt url-cache-creation-function The cache relies on a scheme for mapping URLs to files in the cache. This variable names a function which sets the type of cache to use. @@ -748,6 +740,11 @@ corresponding cache file. The two supplied possibilities are @code{url-cache-create-filename-human-readable}. @end defopt +@defopt url-cache-expire-time +This variable defines a default time value to use as expire delay when +checking if an URL has expired with @code{url-cache-expired}. +@end defopt + @defun url-cache-create-filename-using-md5 url Creates a cache file name from @var{url} using MD5 hashing. This is creates entries with very few cache collisions and is fast. @@ -768,6 +765,19 @@ more likely to conflict with other files. @end smallexample @end defun +@defun url-cache-expired +This is a function to decide whether or not a cache entry has expired. +It takes a an URL as it first parameters and a expiration delay in +second paramater. It returns non-@code{nil} if URL is not cached or is +cached for more than the give expiration delay. If the delay is not +used, @var{url-cache-expire-time} is used instead. +@end defun + +@defun url-fetch-from-cache +This function takes an URL as its first argument and then returns a +buffer containing the data cached for the given URL. +@end defun + @c Fixme: never actually used currently? @c @defopt url-standalone-mode @c @cindex Relying on cache -- 1.7.1