Browse files

Send a PURGE request on save

  • Loading branch information...
1 parent f6239d8 commit fce4e0589f6332b6a6a5012cdb304062c31812ae @scotchi committed Nov 12, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 news.arc
@@ -132,7 +132,9 @@
(def save-votes (u) (save-table (votes* u) (+ votedir* u)))
-(def save-prof (u) (save-table (profs* u) (+ profdir* u)))
+(def save-prof (u)
+ (save-table (profs* u) (+ profdir* u))
+ (purge-from-proxy (user-url u)))
(mac uvar (u k) `((profile ,u) ',k))
@@ -232,7 +234,9 @@
(def live (i) (nor i!dead i!deleted))
-(def save-item (i) (save-table i (+ storydir* i!id)))
+(def save-item (i)
+ (save-table i (+ storydir* i!id))
+ (purge-from-proxy (item-url i!id)))
(def kill (i how)
(unless i!dead
@@ -1409,6 +1413,7 @@ updateAges();
(if (admin user) (pushnew 'nokill i!keys))
(push vote i!votes)
(save-item i)
+ (each a (ancestors i) (purge-from-proxy (item-url a!id)))
(push (list (seconds) i!id i!by (sitename i!url) dir)
(uvar user votes))
(= ((votes* user) i!id) vote)

0 comments on commit fce4e05

Please sign in to comment.