mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
faster connection-cache
This commit is contained in:
parent
0e9e3b09be
commit
239da8522d
1 changed files with 9 additions and 3 deletions
|
|
@ -147,9 +147,15 @@ flushed with FLUSH-CONNECTION-CACHE or a query is made."
|
||||||
(defun flush-connection-cache (clog-obj)
|
(defun flush-connection-cache (clog-obj)
|
||||||
"Flush connection cache if on CLOG-OBJ is located on."
|
"Flush connection cache if on CLOG-OBJ is located on."
|
||||||
(when *connection-cache*
|
(when *connection-cache*
|
||||||
(dolist (script (reverse *connection-cache*))
|
(let ((big (make-string-output-stream)))
|
||||||
(unless (eq script :cache)
|
(write-string "(function(){" big)
|
||||||
(clog-connection:execute (connection-id clog-obj) script)))
|
(dolist (script (reverse *connection-cache*))
|
||||||
|
(unless (eq script :cache)
|
||||||
|
(write-string script big)
|
||||||
|
(write-char #\; big)))
|
||||||
|
(write-string "})()" big)
|
||||||
|
(clog-connection:execute (connection-id clog-obj)
|
||||||
|
(get-output-stream-string big)))
|
||||||
(setf *connection-cache* (list :cache))))
|
(setf *connection-cache* (list :cache))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;
|
;;;;;;;;;;;;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue