Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow either a GET or POST request to expire a cached page.

  • Loading branch information...
commit f3bae78e478f5ab76ba83f5d5a52b4181f923877 1 parent a8149a5
@jgm authored
Showing with 5 additions and 4 deletions.
  1. +1 −1  Network/Gitit.hs
  2. +4 −3 README.markdown
View
2  Network/Gitit.hs
@@ -144,7 +144,7 @@ wikiHandlers =
, dir "_index" indexPage
, dir "_category" $ path $ categoryPage . decodeString
, dir "_categories" categoryListPage
- , dir "_expire" $ methodOnly POST >> expireCache
+ , dir "_expire" $ expireCache
, guardCommand "showraw" >> msum
[ showRawPage
, guardPath isSourceCode >> showFileAsText ]
View
7 README.markdown
@@ -196,12 +196,13 @@ below for information about configuring gitit.)
Cached pages are updated when pages are modified using the web
interface. They are not updated when pages are modified directly
through git or darcs. However, the cache can be refreshed manually
-by pressing Ctrl-R when viewing a page, or by sending a POST
-request to `/_expire` with `pageName` set to the name of the page.
+by pressing Ctrl-R when viewing a page, or by sending an HTTP
+GET or POST request to `/_expire/path/to/page`, where `path/to/page` is
+the name of the page to be expired.
Users who frequently update pages using git or darcs may wish
to set `use-cache` to `no`, or alternatively to add a hook to
-the repository that makes the appropriate POST request to expire
+the repository that makes the appropriate HTTP request to expire
pages when they are updated.
Configuring gitit
Please sign in to comment.
Something went wrong with that request. Please try again.