+2010-09-19 Julien Danjou <julien@danjou.info>
+
+ * url-cache.el (url-fetch-from-cache): New function.
+
2010-09-18 Julien Danjou <julien@danjou.info>
* url-vars.el (url-cache-expired): Remove unused variable.
(let ((coding-system-for-write 'binary))
(write-region (point-min) (point-max) fname nil 5))))))
+(defun url-fetch-from-cache (url)
+ "Fetch URL from cache and return a buffer with the content."
+ (with-current-buffer (generate-new-buffer " *temp*")
+ (url-cache-extract (url-cache-create-filename url))
+ (current-buffer)))
+
;;;###autoload
(defun url-is-cached (url)
"Return non-nil if the URL is cached."