diff of cb412406e2c7d50158273f8b487ec34b1a993964
cb412406e2c7d50158273f8b487ec34b1a993964
diff --git a/src/packages/rss-routes.lisp b/src/packages/rss-routes.lisp
index 8be5cc7..a0f0afc 100644
--- a/src/packages/rss-routes.lisp
+++ b/src/packages/rss-routes.lisp
@@ -3,5 +3,6 @@
(:import-from :easy-routes :defroute)
(:import-from :murja.posts.post-db :get-page)
(:import-from :murja.middleware.db :@transaction)
- (:import-from :murja.middleware.auth :*user*))
+ (:import-from :murja.middleware.auth :*user*)
+ (:local-nicknames (:settings :murja.model.settings)))
diff --git a/src/routes/rss-routes.lisp b/src/routes/rss-routes.lisp
index 9148d14..b2bae0c 100644
--- a/src/routes/rss-routes.lisp
+++ b/src/routes/rss-routes.lisp
@@ -22,17 +22,18 @@
(defroute rsssss ("/api/rss" :method :get
:decorators ( @transaction)) ()
- (let ((lisp-fixup:*rfc822* t))
- (let* ((if-modified-since (when (hunchentoot:header-in* :if-modified-since)
- (lisp-fixup:if-modified-since->simpledate-timestamp
- (hunchentoot:header-in* :if-modified-since))))
- (page (get-page 1 (page-size) :allow-hidden? nil
- :modified-since if-modified-since))
- (last-modified
- ;; this application's tz handling is a fucking joke
- (str:replace-all "EST" "GMT"
- (lisp-fixup:fix-timestamp (caar (murja.posts.post-db:last-modified*))))))
+ (settings:with-cache
+ (let ((lisp-fixup:*rfc822* t))
+ (let* ((if-modified-since (when (hunchentoot:header-in* :if-modified-since)
+ (lisp-fixup:if-modified-since->simpledate-timestamp
+ (hunchentoot:header-in* :if-modified-since))))
+ (page (get-page 1 (page-size) :allow-hidden? nil
+ :modified-since if-modified-since))
+ (last-modified
+ ;; this application's tz handling is a fucking joke
+ (str:replace-all "EST" "GMT"
+ (lisp-fixup:fix-timestamp (caar (murja.posts.post-db:last-modified*))))))
- (setf (hunchentoot:content-type*) "application/rss+xml")
- (setf (hunchentoot:header-out "Last-Modified") last-modified)
- (posts->rss page))))
+ (setf (hunchentoot:content-type*) "application/rss+xml")
+ (setf (hunchentoot:header-out "Last-Modified") last-modified)
+ (posts->rss page)))))