Add a bang to SET-OPTIONS-SESSION-LIFETIME, SET-OPTIONS-CACHE-SURFLETS? and ADJUST-TIMEOUT
This commit is contained in:
parent
536fe1394c
commit
4748a882c3
|
@ -37,8 +37,8 @@
|
|||
options-session-lifetime
|
||||
options-cache-surflets?
|
||||
options-surflet-path
|
||||
set-options-session-lifetime
|
||||
set-options-cache-surflets?
|
||||
set-options-session-lifetime!
|
||||
set-options-cache-surflets?!
|
||||
|
||||
get-sessions
|
||||
session-surflet-name
|
||||
|
@ -49,7 +49,7 @@
|
|||
delete-session!
|
||||
|
||||
session-adjust-timeout!
|
||||
adjust-timeout
|
||||
adjust-timeout!
|
||||
|
||||
get-continuations
|
||||
delete-continuation!
|
||||
|
|
|
@ -338,9 +338,9 @@
|
|||
(set-memo:message memo 'adjust-timeout))
|
||||
(release-lock *session-table-lock*))
|
||||
|
||||
;;; ADJUST-TIMEOUT
|
||||
;;; ADJUST-TIMEOUT!
|
||||
;; Resets time-to-die of current session.
|
||||
(define (adjust-timeout)
|
||||
(define (adjust-timeout!)
|
||||
(session-adjust-timeout! (instance-session-id)))
|
||||
|
||||
;;; RESET-SESSION-TABLE!
|
||||
|
@ -635,10 +635,10 @@
|
|||
(define-record-type options :options
|
||||
(make-options surflet-path cache-surflets? session-lifetime)
|
||||
options?
|
||||
(surflet-path options:surflet-path set-options:surflet-path)
|
||||
(cache-surflets? options:cache-surflets? set-options:cache-surflets?)
|
||||
(surflet-path options:surflet-path set-options:surflet-path!)
|
||||
(cache-surflets? options:cache-surflets? set-options:cache-surflets?!)
|
||||
;; session lifetime is in seconds
|
||||
(session-lifetime options:session-lifetime set-options:session-lifetime))
|
||||
(session-lifetime options:session-lifetime set-options:session-lifetime!))
|
||||
|
||||
;; Constructor with defaults.
|
||||
(define (make-default-options surflet-path)
|
||||
|
@ -653,8 +653,8 @@
|
|||
(define options-surflet-path (make-fluid-selector options:surflet-path))
|
||||
(define options-cache-surflets? (make-fluid-selector options:cache-surflets?))
|
||||
(define options-session-lifetime (make-fluid-selector options:session-lifetime))
|
||||
(define set-options-cache-surflets? (make-fluid-setter set-options:cache-surflets?))
|
||||
(define set-options-session-lifetime (make-fluid-setter set-options:session-lifetime))
|
||||
(define set-options-cache-surflets?! (make-fluid-setter set-options:cache-surflets?!))
|
||||
(define set-options-session-lifetime! (make-fluid-setter set-options:session-lifetime!))
|
||||
|
||||
|
||||
;;; SURFLET-RESPONSE: Surflets are expected to return this object type.
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
(if (and (integer? result)
|
||||
(> result 0))
|
||||
(begin
|
||||
(set-options-session-lifetime result)
|
||||
(set-options-session-lifetime! result)
|
||||
(handler-options req
|
||||
(format #f "Session lifetime changed to ~a."
|
||||
(options-session-lifetime))))
|
||||
|
@ -67,7 +67,7 @@
|
|||
(handler-options req "Please enter a valid, positive integer number"))))
|
||||
((returned-via? submit-cache bindings)
|
||||
(let ((cache-plugins? (input-field-value cache-checkbox bindings)))
|
||||
(set-options-cache-surflets? cache-plugins?)
|
||||
(set-options-cache-surflets?! cache-plugins?)
|
||||
(handler-options req
|
||||
(format #f "Caching turned ~s."
|
||||
(if cache-plugins? "on" "off")))))
|
||||
|
|
Loading…
Reference in New Issue