From cacc9f6d509693c3650ffd59251a5d933209607c Mon Sep 17 00:00:00 2001 From: Maciej Pasternacki Date: Tue, 2 Dec 2008 16:59:35 +0100 Subject: [PATCH] - CACHE-DAO returns a cached dao. --- src/common.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common.lisp b/src/common.lisp index 2c0069e..696e874 100644 --- a/src/common.lisp +++ b/src/common.lisp @@ -81,12 +81,15 @@ Usually it will be a reader method automatically defined for ID column of a DAO. (call-next-method))) (defun cache-dao (dao) - "Manually add DAO to cache used by WITH-DAO-CACHE." + "Manually add DAO to cache used by WITH-DAO-CACHE. + +Returns DAO" (when (boundp '-dao-cache-) (push (cons (cons (class-name (class-of dao)) (postmodern:dao-keys dao)) dao) - -dao-cache-))) + -dao-cache-)) + dao) (defmacro with-dao-cache (&body body) "Cache DAOs within dynamic extent of BODY. -- 2.11.4.GIT