]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove '&' from cache
authorAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 16:16:01 +0000 (11:16 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 16:49:40 +0000 (11:49 -0500)
doc/antora/modules/reference/pages/raddb/mods-available/cache.adoc
doc/antora/modules/reference/pages/raddb/mods-available/cache_eap.adoc
doc/antora/modules/reference/pages/raddb/mods-available/cache_tls.adoc
raddb/mods-available/cache
raddb/mods-available/cache_eap
raddb/mods-available/cache_tls

index c17277319eb2b34849176d3fa866bdbbb6287962..0ebde9d055bd6fbbd77a4e312d50178ede9a9d4f 100644 (file)
@@ -133,7 +133,7 @@ You should never set the "epoch" configuration item in this file.
 add_stats::
 
 If `yes` the following attributes will be added to the request:
-  * `&request.Cache-Entry-Hits` - The number of times this entry
+  * `request.Cache-Entry-Hits` - The number of times this entry
 has been retrieved.
 
 NOTE: Not supported by the `rlm_cache_memcached` module.
@@ -177,7 +177,7 @@ For example, if the `cache` module is configured with the
 block below:
 
 update {
-      &reply.Reply-Message := "Hello %{User-Name}"
+      reply.Reply-Message := "Hello %{User-Name}"
 }
 
 When the cache entry is created, the module will expand the
@@ -188,7 +188,7 @@ Once all of the right-hand values are expanded, the
 resulting cache entry will look like this:
 
 update {
-      &reply.Reply-Message := "Hello bob"
+      reply.Reply-Message := "Hello bob"
 }
 
 When the cache module is read, this `update` section is
@@ -197,8 +197,8 @@ file.
 
 NOTE: Only `request`, `reply`, `control` and
 `session-state` lists are available for the left side of
-cache entries. Attempting to reference other lists *will
-raise an error* during config validation.
+cache entries. Attempting to reference other lists will
+raise an error during config validation.
 
 
 <list>.<attribute> <op> <value>::
@@ -216,9 +216,9 @@ Add your own value for `link:https://freeradius.org/rfc/rfc2865.html#Class[Class
 ### Configuration
 
 This module supports a number of runtime configuration parameters
-represented by attributes in the `&control.` list.
+represented by attributes in the `control.` list.
 
-&control.Cache-TTL:: Sets the TTL of an entry to be created, or
+control.Cache-TTL:: Sets the TTL of an entry to be created, or
  modifies the TTL of an existing entry.
 
 [options="header,autowidth"]
@@ -231,7 +231,7 @@ represented by attributes in the `&control.` list.
 | `Cache-TTL` of `0`   | Expire the existing entry and create a new one.
 |===
 
-&control.Cache-Status-Only:: If present and set to `yes` will
+control.Cache-Status-Only:: If present and set to `yes` will
 prevent a new entry from being created, and existing entries from
 being merged. It will also alter the module's return codes.
 
@@ -241,26 +241,26 @@ being merged. It will also alter the module's return codes.
 NOTE: If this is set to `yes`, no other cache control attributes will
 be honoured, but they will still be cleared.
 
-&control.Cache-Allow-Insert:: If present and set to `no` will
+control.Cache-Allow-Insert:: If present and set to `no` will
 prevent a new entry from being created. If not present or set
 to `yes`, and no entry exists, a new one will be created.
 This is evaluated after `Cache-TTL`, so expired entries may be
 recreated.
 
-&control.Cache-Allow-Merge:: If present and set to `no` will
+control.Cache-Allow-Merge:: If present and set to `no` will
 prevent existing entries from being merged. If not present or
 set to `yes`, and an entry exists (and is valid), it will be
 merged with the current request.
 This is evaluated before `Cache-TTL`, so entries being expired
 may first be merged.
 
-&control.Cache-Merge-New:: If present and set to `yes` will merge new
+control.Cache-Merge-New:: If present and set to `yes` will merge new
 cache entries into the current request. Useful if results of execs or
 expansions are stored directly in the cache.
 
 
 NOTE: All runtime configuration attributes will be removed from the
-`&control.` list after the cache module is called.
+`control.` list after the cache module is called.
 
 ### Methods
 
@@ -331,7 +331,7 @@ cache.ttl:: Change the TTL on an existing entry.
 
 ```
 # Add a cache entry
-&control.Cache-TTL := 1h
+control.Cache-TTL := 1h
 cache.store
 if (updated) {
   ..keys stored
@@ -350,7 +350,7 @@ if (updated) {
 }
 
 # Change the entries TTL
-&control.Cache-TTL := 30m
+control.Cache-TTL := 30m
 cache.ttl
 if (updated) {
   ..ttl changed
@@ -368,7 +368,7 @@ if (ok) {
   * This is evaluated before `Cache-TTL`, so entries being expired
 may first be merged.
   * All runtime configuration attributes will be removed from the
-`&control:` list after any cache method is called.
+`control:` list after any cache method is called.
 ====
 
 
@@ -404,14 +404,14 @@ cache {
 #                      idle_timeout = 60
 #              }
 #      }
-       key = &User-Name
+       key = %{User-Name}
        ttl = 10
        add_stats = no
 #      max_entries = 0
        update {
-               &reply.Reply-Message := &reply.Reply-Message
-               &reply.Reply-Message += "Cache last updated at %t"
-               &reply.Class := "%randstr(ssssssssssssssssssssssssssssssss)"
+               reply.Reply-Message := reply.Reply-Message
+               reply.Reply-Message += "Cache last updated at %t"
+               reply.Class := "%randstr(ssssssssssssssssssssssssssssssss)"
        }
 }
 ```
index 9f356f7284a3f00d2dd9db4e30ff8ea5f20bec9e..c504a90de0ef22d1f92a20eca8ded1406f524803 100644 (file)
@@ -68,11 +68,11 @@ update <section> { ... }::
 
 ```
 cache cache_eap {
-       key = "%{&control.State || &reply.State || &State}"
+       key = "%{control.State || reply.State || State}"
        ttl = 15
        update reply {
-               &reply += &reply
-               &control.State := &request.State
+               reply += reply
+               control.State := request.State
        }
 }
 ```
index 3c1d3fa5173cceb28255370b7b6b74b173832b15..f2ce41d7948c4676644b788173b44f01287e3d04 100644 (file)
@@ -69,18 +69,18 @@ update <section> { ... }::
 ```
 cache cache_tls_session {
        driver = "rbtree"
-       key = &Session-Id
+       key = %{Session-Id}
        ttl = 3600      # 60 mins
        update {
-               &reply.Session-Data := &Session-Data
+               reply.Session-Data := Session-Data
        }
 }
 cache cache_ocsp {
        driver = "rbtree"
-       key = &session-state.TLS-Client-Cert-Serial
+       key = %{session-state.TLS-Client-Cert-Serial}
        update {
-               &control.TLS-OCSP-Cert-Valid := &TLS-OCSP-Cert-Valid
-               &control.TLS-OCSP-Response := &TLS-OCSP-Response
+               control.TLS-OCSP-Cert-Valid := TLS-OCSP-Cert-Valid
+               control.TLS-OCSP-Response := TLS-OCSP-Response
        }
 }
 ```
index 1d5a8b64cd9503e687bcac0a7ed05bbe61e9d788..5b1a261c6caeedf97bf6326b8e1d176dfcfa8c03 100644 (file)
@@ -144,7 +144,7 @@ cache {
        #
        #  key:: The `key` used to index the cache. It is dynamically expanded at run time.
        #
-       key = &User-Name
+       key = %{User-Name}
 
        #
        #  ttl::
@@ -167,7 +167,7 @@ cache {
        #  add_stats::
        #
        #  If `yes` the following attributes will be added to the request:
-       #  * `&request.Cache-Entry-Hits` - The number of times this entry
+       #  * `request.Cache-Entry-Hits` - The number of times this entry
        #  has been retrieved.
        #
        #  NOTE: Not supported by the `rlm_cache_memcached` module.
@@ -213,7 +213,7 @@ cache {
        #  block below:
        #
        #       update {
-       #              &reply.Reply-Message := "Hello %{User-Name}"
+       #              reply.Reply-Message := "Hello %{User-Name}"
        #       }
        #
        #  When the cache entry is created, the module will expand the
@@ -224,7 +224,7 @@ cache {
        #  resulting cache entry will look like this:
        #
        #       update {
-       #              &reply.Reply-Message := "Hello bob"
+       #              reply.Reply-Message := "Hello bob"
        #       }
        #
        #  When the cache module is read, this `update` section is
@@ -233,8 +233,8 @@ cache {
        #
        #  NOTE: Only `request`, `reply`, `control` and
        #  `session-state` lists are available for the left side of
-       #  cache entries. Attempting to reference other lists *will
-       #  raise an error* during config validation.
+       #  cache entries. Attempting to reference other lists will
+       #  raise an error during config validation.
        #
        update {
                #
@@ -242,13 +242,13 @@ cache {
                #
 
                #  Cache all instances of `Reply-Message` in the reply list.
-               &reply.Reply-Message := &reply.Reply-Message
+               reply.Reply-Message := reply.Reply-Message
 
                #  Add our own to show when the cache was last updated.
-               &reply.Reply-Message += "Cache last updated at %t"
+               reply.Reply-Message += "Cache last updated at %t"
 
                #  Add your own value for `Class`.
-               &reply.Class := "%randstr(ssssssssssssssssssssssssssssssss)"
+               reply.Class := "%randstr(ssssssssssssssssssssssssssssssss)"
        }
 
        #
@@ -257,9 +257,9 @@ cache {
        #  ### Configuration
        #
        #  This module supports a number of runtime configuration parameters
-       #  represented by attributes in the `&control.` list.
+       #  represented by attributes in the `control.` list.
        #
-       #  &control.Cache-TTL:: Sets the TTL of an entry to be created, or
+       #  control.Cache-TTL:: Sets the TTL of an entry to be created, or
        #   modifies the TTL of an existing entry.
        #
        #  [options="header,autowidth"]
@@ -272,7 +272,7 @@ cache {
        #  | `Cache-TTL` of `0`   | Expire the existing entry and create a new one.
        #  |===
        #
-       #  &control.Cache-Status-Only:: If present and set to `yes` will
+       #  control.Cache-Status-Only:: If present and set to `yes` will
        #  prevent a new entry from being created, and existing entries from
        #  being merged. It will also alter the module's return codes.
        #
@@ -282,26 +282,26 @@ cache {
        #  NOTE: If this is set to `yes`, no other cache control attributes will
        #  be honoured, but they will still be cleared.
        #
-       #  &control.Cache-Allow-Insert:: If present and set to `no` will
+       #  control.Cache-Allow-Insert:: If present and set to `no` will
        #  prevent a new entry from being created. If not present or set
        #  to `yes`, and no entry exists, a new one will be created.
        #  This is evaluated after `Cache-TTL`, so expired entries may be
        #  recreated.
        #
-       #  &control.Cache-Allow-Merge:: If present and set to `no` will
+       #  control.Cache-Allow-Merge:: If present and set to `no` will
        #  prevent existing entries from being merged. If not present or
        #  set to `yes`, and an entry exists (and is valid), it will be
        #  merged with the current request.
        #  This is evaluated before `Cache-TTL`, so entries being expired
        #  may first be merged.
        #
-       #  &control.Cache-Merge-New:: If present and set to `yes` will merge new
+       #  control.Cache-Merge-New:: If present and set to `yes` will merge new
        #  cache entries into the current request. Useful if results of execs or
        #  expansions are stored directly in the cache.
        #
        #
        #  NOTE: All runtime configuration attributes will be removed from the
-       #  `&control.` list after the cache module is called.
+       #  `control.` list after the cache module is called.
        #
        #  ### Methods
        #
@@ -372,7 +372,7 @@ cache {
        #
        #  ```
        #  # Add a cache entry
-       #  &control.Cache-TTL := 1h
+       #  control.Cache-TTL := 1h
        #  cache.store
        #  if (updated) {
        #    ..keys stored
@@ -391,7 +391,7 @@ cache {
        #  }
        #
        #  # Change the entries TTL
-       #  &control.Cache-TTL := 30m
+       #  control.Cache-TTL := 30m
        #  cache.ttl
        #  if (updated) {
        #    ..ttl changed
@@ -409,7 +409,7 @@ cache {
        #  * This is evaluated before `Cache-TTL`, so entries being expired
        #  may first be merged.
        #  * All runtime configuration attributes will be removed from the
-       #  `&control:` list after any cache method is called.
+       #  `control:` list after any cache method is called.
        #  ====
        #
 }
index 41ddc505cc1b90cac5d7d2b551c091961d2c308d..0f4e54085305d78e6d819d56d8a7e3edd69c0677 100644 (file)
@@ -59,7 +59,7 @@ cache cache_eap {
        #
        #  key:: Cache key.
        #
-       key = "%{&control.State || &reply.State || &State}"
+       key = "%{control.State || reply.State || State}"
 
        #
        #  ttl:: TTL for cache entries.
@@ -70,7 +70,7 @@ cache cache_eap {
        #  update <section> { ... }::
        #
        update reply {
-               &reply += &reply
-               &control.State := &request.State
+               reply += reply
+               control.State := request.State
        }
 }
index c4d9f1182913557312521084521a2ce773afd630..7416322e305a0c8abcb0ff870ad218055d4dfe19 100644 (file)
@@ -43,7 +43,7 @@ cache cache_tls_session {
        #
        #  key:: The `cache` key.
        #
-       key = &Session-Id
+       key = %{Session-Id}
 
        #
        #  ttl:: TTL for `cache` entries.
@@ -54,7 +54,7 @@ cache cache_tls_session {
        #  update <section> { ... }::
        #
        update {
-               &reply.Session-Data := &Session-Data
+               reply.Session-Data := Session-Data
        }
 }
 
@@ -72,13 +72,13 @@ cache cache_ocsp {
        #
        #  key:: `cache` key.
        #
-       key = &session-state.TLS-Client-Cert-Serial
+       key = %{session-state.TLS-Client-Cert-Serial}
 
        #
        #  update <section> { ... }::
        #
        update {
-               &control.TLS-OCSP-Cert-Valid := &TLS-OCSP-Cert-Valid
-               &control.TLS-OCSP-Response := &TLS-OCSP-Response
+               control.TLS-OCSP-Cert-Valid := TLS-OCSP-Cert-Valid
+               control.TLS-OCSP-Response := TLS-OCSP-Response
        }
 }