The cacle Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cacle Reference Manual

This is the cacle Reference Manual, version 1.0.0, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 10:51:23 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cacle - Extensible Cache services for Common Lisp

1. Introduction

cacle implements a generic cache management facility with configurable and extensible cache replacement policies. The actual cached data can be stored anywhere, with cacle taking charge of keeping track of which entry is to be discarded next when more space is needed for a new entry.

cacle is built to be thread safe and thus ready to be used in multithreaded environments, such as web services. In case multiple threads request the same piece of data simultaneously, the data is only obtained from the data provider once, then distributed to all the threads that requested it.

Note! While cacle itself is thread safe, the provider and cleanup functions are not called in a locked context, as they may take a long time to complete, during which fetches from the cache should be possible. It is on the user's responsibility to protect against potential thread conflicts in the provider and cleanup functions.

2. Installation

cacle can be installed using Quicklisp:

* (ql:quickload "cacle")
; Loading "cacle"
("cacle")
* (require "cacle")
"cacle"
NIL

3. Examples

3.1. Walkthrough

As cacle does not care about the nature of the data in the cache, nor where it comes from, it needs a provider function that is able to obtain a block of data, given the block's key. What the key is is up to the application; to cacle, it is just something that can function as a key to a hash table. Indeed, cacle stores the current contents of the cache in a hash table; the table's test can be specified when creating the cache.

Let's introduce a provider that maps key k into a block k units long. As the block's data content, a simple string is constructed. Of course, the string is not of the length indicated by the provider, but that is exactly the point: cacle does not care what the data is. The string could, for example, be the name of the actual file that holds the contents of the data block.

* (defun test-provider (key)
    "A provider returns two values: The data for the element, and the element's size."
    (format t "Providing data for key ~a~%" key)
    ;; Fetching the data takes some time...
    (sleep 1)
    (values (format nil "value for ~a" key)
            key))
TEST-PROVIDER

Now we are ready to create a cache that manages these blocks of data.

* (defparameter *my-cache* (cacle:make-cache 100 #'test-provider :policy :lru))
*MY-CACHE*
* (cacle:cache-max-size *my-cache*)
100
* (cacle:cache-size *my-cache*)
0
* (cacle:cache-count *my-cache*)
0

So, the cache is empty. Let's fetch some data.

* (cacle:cache-fetch *my-cache* 42)
Providing data for key 42
"value for 42"
NIL

Note the one-second delay in the function call. The function returned two values; meaning of the second value (here NIL) will be discussed later in this document.

etching the same data again does not cause a call to the provider, with the value returned immediately.

* (cacle:cache-fetch *my-cache* 42)
"value for 42"
NIL
* (cacle:cache-fetch *my-cache* 42)
"value for 42"
NIL

Next, widen the scope of requested items:

* (cacle:cache-fetch *my-cache* 17)
Providing data for key 17
"value for 17"
NIL
* (cacle:cache-fetch *my-cache* 33)
Providing data for key 33
"value for 33"
NIL
* (cacle:cache-fetch *my-cache* 42)
"value for 42"
NIL
* (cacle:cache-size *my-cache*)
92
* (cacle:cache-count *my-cache*)
3

The cache is already quite full, with 92 units out of 100 used. What happens if we now request data with a fresh key?

* (cacle:cache-fetch *my-cache* 24)
Providing data for key 24
"value for 24"
* (cacle:cache-size *my-cache*)
99
* (cacle:cache-count *my-cache*)
3

One of the stored blocks of data needs to go. Since of the three keys in the cache, both 42 and 33 have been referenced after 17, 17 has been discarded:

* (mapcar #'(lambda (key)
              (cacle:cache-fetch *my-cache* key :only-if-cached t))
          '(42 17 33 24))
("value for 42" NIL "value for 33" "value for 24")

Setting the :only-if-cached option prevents the calling of the provider if the queried data is not found in the cache, just returning NIL instead.

If multiple threads request the same data, the provider is only called once, with all threads eventually getting the same result data:

* (loop with out = *standard-output*
        for i below 10
        collect (bt:make-thread #'(lambda ()
                                    (let ((*standard-output* out))
                                      (cacle:cache-fetch *my-cache* 72)))))
Providing data for key 72
(#<PROCESS Anonymous thread(37) [Active] #x...> #<PROCESS Anonymous thread(38) [semaphore wait] #x...> #<PROCESS Anonymous thread(39) [semaphore wait] #x...> #<PROCESS Anonymous thread(40) [semaphore wait] #x...> #<PROCESS Anonymous thread(41) [semaphore wait] #x...> #<PROCESS Anonymous thread(42) [semaphore wait] #x...> #<PROCESS Anonymous thread(43) [semaphore wait] #x...> #<PROCESS Anonymous thread(44) [semaphore wait] #x...> #<PROCESS Anonymous thread(45) [semaphore wait] #x...> #<PROCESS Anonymous thread(46) [semaphore wait] #x...>)
* (mapcar #'bt:join-thread *)
("value for 72" "value for 72" "value for 72" "value for 72" "value for 72" "value for 72" "value for 72" "value for 72" "value for 72" "value for 72")
* (loop with first = (first *)
        for i in *
        always (eq i first))
T

Finally, get rid of all the cached data:

* (cacle:cache-flush *my-cache*)
NIL
* (cacle:cache-size *my-cache*)
0
* (cacle:cache-count *my-cache*)
0

To facilitate situations where data expiring from the cache needs some cleaning up - such as in the abovementioned case of the cache being on the disk - an optional cleanup function can be defined for the cache. This function is called whenever a block of data is discarded from the cache.

* (defun test-cleanup (data)
    (format t "Cleaning up: ~a~%" data))
TEST-CLEANUP
* (setf *my-cache* (cacle:make-cache 100 #'test-provider :policy :lru :cleanup #'test-cleanup))
#<CACHE #x...>

As cacle is designed to be used on multiple threads, a situation may arise where multiple threads request data from the cache simultaneously and an entry is removed from the cache by another thread before the thread that requested it can use the data. To prevent this situation, when a cleanup function has been defined for the cache, each call to cache-fetch must be paired with a call to cache-release. The release function is given as an argument the second value returned by cache-fetch. The cleanup function will not be called for the data if there are live references (fetches without corresponding releases) for the data.

* (defparameter *42* (multiple-value-list (cacle:cache-fetch *my-cache* 42)))
Providing data for key 42
*42*
* *42*
("value for 42" #<LINKED-CACHE-ENTRY key 42 #x...>)

The tag datum should be treated opaque by the caller and used only as an argument to cache-release.

A utility macro, with-cache-fetch, is provided for ensuring the pairing of cache-fetch and cache-release:

* (cacle:with-cache-fetch item (*my-cache* 17)
    (format t "my data: ~a~%" item))
Providing data for key 17
my data: value for 17
NIL
* (cacle:with-cache-fetch item (*my-cache* 33)
    (format t "my data: ~a~%" item))
Providing data for key 33
my data: value for 33
NIL
* (cacle:with-cache-fetch item (*my-cache* 24)
    (format t "my data: ~a~%" item))
Providing data for key 24
my data: value for 24
NIL
* (cacle:with-cache-fetch item (*my-cache* 55)
    (format t "my data: ~a~%" item))
Providing data for key 55
Cleaning up: value for 33
Cleaning up: value for 17
my data: value for 55
NIL

Note that even before the last function call, the item for the key 42 has already expired from the cache, since the total would otherwise exceed the cache's limit of 100. However, it has not been cleaned up, because it is still reserved by the very first call to cache-fetch that has not been matched with the call to cache-release yet.

* (cacle:cache-release *my-cache* (second *42*))
Cleaning up: value for 42
NIL

Note! This example also demonstrates a property in the design of cacle that should be understood before using it: The maximum size defined for the cache is the size of the live objects in the cache and does not include items that have already been scheduled for removal, pending a call to cache-release, or items that are being fetched to the cache. That is, the total size of the cache may exceed its limit by the combined size of the items currently being used by the application.

3.2. A simple CDN node

A simple node in a content distribution network could be built using cacle as follows. The content being distributed is fetched from a content server, and the cache resides on the local disk.

Warning: untested code - written as an example, not to be used as a real world CDN

(defparameter *content-server* "http://server.example.com/")
(defparameter *disk-space* #x1000000000) ;; 64 GB
(defparameter *cache-path* "/var/cache/%")

(defun fetch-content (uri)
  ;; This provider function retrieves data from the content server
  (let* (size
         (file (fad:with-output-to-temporary-file (out :template *cache-path* 
                                                       :element-type '(unsigned-byte 8))
                 (multiple-value-bind (in status)
                     (drakma:http-request (concatenate 'string *content-server* uri)
                                          :want-stream t)
                   ;; Copy the retrieved data into a file
                   (when (<= 200 status 299)
                     (fad:copy-stream in out)
                     (setf size (file-length out)))))))
    (if size
        (values file size) ; success
        (progn ; error
          (ignore-errors (delete-file file))
          (values nil 0)))))

(defun cleanup-content (file)
  ;; When content removed from the cache, delete the corresponding file
  (ignore-errors (delete-file file)))

;; Set object lifetime to 3600 seconds to force a refresh once per hour
(defparameter *cache* (cacle:make-cache *disk-space* #'fetch-content 
                                        :test 'equal
                                        :cleanup #'cleanup-content
                                        :policy :lfuda
                                        :lifetime 3600))

;; Function called by the web server to serve a certain file
(defun serve-file (uri)
  (cacle:with-cache-fetch file (*cache* uri)
    (if file
        (progn
          ;; Send back the data in file
          ...)
        (progn
          ;; Report a 404 not found
          ))))

That's it. On an incoming request, serve-file will fetch the corresponding content from a file in the cache. If the content is not cached, it is transparently fetched from the content server, stored in the cache, and sent to the end user.

4. Cache replacement policies

A cache replacement policy defines how existing entries are discarded from the cache to make room for the data that is currently being loaded. cacle implements a set of simple replacement policies and provides means for the user to build their own policy, if necessary. Additionally, a lifetime can be defined for the cache, after which cached data expires and a fresh copy is obtained instead.

The following cache replacement policies are implemented:

4.1. Creating your own replacement policy

Each cache replacement policy is responsible of keeping track of all the entries currently in the cache. A suitable daata structure should be chosen so that the relevant operations are as fast as possible.

A policy is a class that is instantiated once per a cache managed by the policy. Policies should be built as the replacement-policy class as the superclass. Additionally, a number of derived classes, listed in the next section, are exported by cacle and can be used as basis for a custom policy.

To be able to store entries in the policy's desired manner, each cache entry must be able to hold certain policy specific data. To accommodate this, policies may define specializations of the cache entry base class cache-entry. Policies must treat the base class opaque and access the base class's data only through the exported readers (entry-key, entry-size and entry-expiry). Policies can add slots as necessary for their own operation, and change-class of an entry-to-be-added in the entry-added generic function.

For example, linked-list-replacement-policy stores the entries in a circular doubly linked list to serve simple policies such as FIFO or LRU. In a list structure, insertion and removal of entries are constant time operations, but lookups for entries other than the first or last are costly. The respective cache entry class, linked-cache-entry, defines two additional slots that hold the forward and backward pointers:

(defclass linked-cache-entry (cache-entry)
  ((next)
   (prev)))

The replacement policy class itself holds the head of the list of entries, and, when a new entry is added to cache, changes the entry's class and pushes it at the head of the list. The call to change-class is done in a :before method so that classes derived from linked-list-replacement-policy do not need to remember to (call-next-method) in their entry-added method implementations.

(defclass linked-list-replacement-policy (replacement-policy)
  ((head :initform (make-instance 'linked-cache-entry))))

(defmethod entry-added :before ((policy linked-list-replacement-policy) (entry cache-entry))
  (change-class entry 'linked-cache-entry))

(defmethod entry-added ((policy linked-list-replacement-policy) (entry cache-entry))
  (link-after entry (slot-value policy 'head)))

The following classes have been implemented for the bundled replacement policies:

lfu-replacement-policy uses a heap structure to store entries in their changing order of precedence. lfuda-replacement-policy builds on it.

5. Dictionary

5.1. The cache class

[Standard class] cache

cache is the main class of the system. It contains information abnout the data blocks currently stored in a certain cache. Note that while storing the information, cache leaves the storage of the actual data to the user: The data could be, for example, a vector of octets directly linked to the entry; a certain file in the filesystem; or a bunch of bananas in the storage room of a zoo.

While you can create an instance of cache directly with make-instance, it is recommended to use the convenience function make-cache.


[Generic reader] cache-max-size cache => number

[Generic writer] (setf (cache-max-size cache) new-max-size)

Retrieves or sets the maximum cache size.


[Generic reader] cache-provider cache => function

[Generic writer] (setf (cache-provider cache) new-provider)

Retrieves or sets the cache's provider function.


[Generic reader] cache-cleanup cache => function

[Generic writer] (setf (cache-cleanup cache) new-cleanup)

Retrieves or sets the cache's cleanup function.


[Generic reader] cache-lifetime cache => number

[Generic writer] (setf (cache-lifetime cache) new-lifetime)

Retrieves or sets the cache object lifetime in seconds.


[Generic reader] cache-policy cache => replacement-policy

Retrieves the cache's replacement policy.


[Generic function] cache-size cache => number

Returns the sum of the sizes of data items currently stored in the cache.


[Generic function] cache-count cache => integer

Returns the number of data items currently stroed in the cache.

5.2. Cache functions

[Function] make-cache max-size provider &key (test 'eql) (policy :fifo) lifetime cleanup => cache

This function creates a new cache instance with the specified maximum size and provider function.

max-size defines the cache's capacity in some units of the application's choice - for example, bytes, kilograms, or bananas.

provider must be a function that takes a single argument, key of the data to provide, and returns two values: the data and its size.

test is the same as make-hashtable's test and affects the cache's underlying hashtable for key equality comparisons.

policy defines the cache replacement policy. It must be NIL if and only if max-size is NIL as well. To specify a policy from the set offered by cacle, you can use a keyword (:fifo, :lifo, :lru, :mru, :random, :lfu or :lfuda). To use a custom removal policy, pass an instance of the policy class.

lifetime defines an optional object lifetime in seconds. If lifetime is defined, cache-fetch will not return objects returned by provider longer than this time ago.

cleanup defines an optional callback function to be called for data that is being discarded from the cache. The function receives a single parameter - the data - and its return value is discarded.


[Generic function] cache-fetch cache &key only-if-cached => (values datum tag)

Fetches a datum from the cache for the given key. If the datum is not currently cached and the only-if-cached flag is not set, it is retrieved from the provider function, added to the cache, and then returned. The tag return value must be specified in a corresponding call to cache-release before it will be cleaned up.


[Generic function] cache-release cache tag => NIL

Releases a reference obtained by a call to cache-fetch.


[Macro] with-cache-fetch var (cache key &key only-if-cached) &body body

Wraps the given body between calls to cache-fetch and cache-release, ensuring that the data fetched from the cache is valid inside body and will be released afterwards.


[Generic function] cache-remove cache key => (or T NIL)

Removes the datum for the specified key from the cache. Returns T if the data was currently cached, NIL otherwise.


[Generic function] cache-flush cache => NIL

Removes all entries from the cache.

5.3. Cache removal policies

[Standard class] cache-entry

Base class for cache entries. All entries are created as instances of this class, but the active removal policy may change the entry's class in the call to entry-added.

[Generic reader] entry-key

[Generic reader] entry-valid-p

[Generic reader] entry-size

[Generic reader] entry-expiry

Readers for the cache entry's basic information. entry-size will signal an unbound-slot condition when the entry is not valid (when entry-valid-p returns NIL).

To ensure thread safety, these functions must not be used outside of the cache removal policy callback functions entry-added, access-entry, entry-removed and evict-entry. The same restriction applies to all functions related to cache entries.


[Standard class] linked-cache-entry

Cache entry that can be stored in a circular doubly linked list for bookkeeping.

[Generic reader] entry-next linked-cache-entry => linked-cache-entry

[Generic reader] entry-previous linked-cache-entry => linked-cache-entry

[Generic function] unlink linked-cache-entry => linked-cache-entry

[Generic function] link-before linked-cache-entry linked-cache-entry => linked-cache-entry

[Generic function] link-after linked-cache-entry linked-cache-entry => linked-cache-entry

These functions traverse and modify the doubly linked list formed by the entries. Each linked-cache-entry starts as a one-entry-long list of its own, liked to itself in both directions.


[Standard class] indexed-cache-entry

An indexed cache entry simply associates a free-form index with each cache entry.

[Generic reader] entry-index indexed-cache-entry => value

[Generic writer] (setf (entry-index indexed-cache-entry) new-index)


[Standard class] replacement-policy

Base class for all replacement policies.

[Generic function] entry-added policy entry => anything

The cache calls this function for each new cache entry. The policy should initialize whatever bookkeeping is necessary; usually, this begins with changing the class of the entry to something able to hold the bookkeeping information.

[Generic function] access-entry policy entry => (or T NIL)

When an entry is accessed in the cache, this function is called. The function should verify that the entry is still valid and update the bookkeeping data related to entry accesses. Returning T means that the entry is still valid and should be returned to the caller; returning NIL removes the entry and results in a new call to the provider.

Note that access-entry is not called for the very first access (when entry-added is called).

[Generic function] entry-removed policy entry => anything

This function notifies the policy that an entry has been removed from the cache. The policy should update its bookkeeping data to keep track of the situation.

[Generic function] evict-entry policy size-hint => cache-entry

When the cache space runs out, this function is called for the policy. The policy instance should decide which of the currently present entries is to be discarded to make room for the new one, remove it from its books, and return the entry.

The size-hint parameter tells how much space needs to be freed from the cache in order to fit in the new entry; the policy may use this information if it wishes. If not enough space is freed by the returned cache-entry, the cache simply calls evict-entry again until enough space has been freed.

Note that entry-removed is not called for the entry returned by evict-entry.


[Standard class] linked-list-replacement-policy

This policy stores entries in a linked list, pushing any new items after the head. evict-entry is not implemented, so the class cannot be directly used as a replacement policy.

[Generic reader] linked-list-head linked-list-replacement-policy => linked-cache-entry

Returns the head node of the linked list. The head node is a sentinel; it is a linked-cache-entry without a key or data, simply serving as a point for attaching the actual data nodes.


[Standard class] fifo-replacement-policy

[Standard class] lifo-replacement-policy

[Standard class] lru-replacement-policy

[Standard class] mru-replacement-policy

[Standard class] random-replacement-policy

[Standard class] lfu-replacement-policy

[Standard class] lfuda-replacement-policy

These classes implement their respective cache replacement policies.

6. Tests

Unit tests for cacle are written using FiveAM. They are hidden behind the #+5am read-time conditional; to enable the tests, load FiveAM before compiling cacle. After that, you can run the test suite from the REPL:

* (5am:run! 'cacle:cacle-tests)

Running test suite CACLE-TESTS
 Running test [...]
 [...]
 Did 619 checks.
    Pass: 619 (100%)
    Skip: 0 ( 0%)
    Fail: 0 ( 0%)

NIL

7. License

MIT


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cacle

Maintainer

Jussi Lahdenniemi <jussi@lahdenniemi.fi>

Author

Jussi Lahdenniemi <jussi@lahdenniemi.fi>

License

MIT

Description

Extensible cache services for Common Lisp

Version

1.0.0

Dependency

bordeaux-threads

Source

cacle.asd (file)

Component

cacle (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cacle/cacle

Parent

cacle (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cacle.asd

Location

cacle.asd

Systems

cacle (system)

Packages

cacle-system


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cacle/cacle/package.lisp

Parent

cacle (module)

Location

src/package.lisp

Packages

cacle


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cacle/cacle/testsuite.lisp

Dependency

package.lisp (file)

Parent

cacle (module)

Location

src/testsuite.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 cacle/cacle/entry.lisp

Dependencies
Parent

cacle (module)

Location

src/entry.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 cacle/cacle/policy.lisp

Dependency

entry.lisp (file)

Parent

cacle (module)

Location

src/policy.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 cacle/cacle/simple-policies.lisp

Dependency

policy.lisp (file)

Parent

cacle (module)

Location

src/simple-policies.lisp

Exported Definitions
Internal Definitions

array-replacement-policy (class)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 cacle/cacle/lfu-policies.lisp

Dependency

policy.lisp (file)

Parent

cacle (module)

Location

src/lfu-policies.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.8 cacle/cacle/cache.lisp

Dependencies
Parent

cacle (module)

Location

src/cache.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 cacle-system

Source

cacle.asd

Use List

Previous: , Up: Packages   [Contents][Index]

5.2 cacle

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: with-cache-fetch VAR (CACHE KEY &key ONLY-IF-CACHED) &body BODY

Combines a cache-fetch and cache-release in a form.

Package

cacle

Source

cache.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: make-cache MAX-SIZE PROVIDER &key TEST POLICY LIFETIME CLEANUP

Create a new cache with the specified maximum size, provider function, and options.

Package

cacle

Source

cache.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: access-entry POLICY ENTRY
Package

cacle

Source

policy.lisp (file)

Methods
Method: access-entry (POLICY lfu-replacement-policy) (ENTRY heap-cache-entry)
Source

lfu-policies.lisp (file)

Method: access-entry (POLICY mru-replacement-policy) (ENTRY cache-entry)
Source

simple-policies.lisp (file)

Method: access-entry (POLICY lru-replacement-policy) (ENTRY cache-entry)
Source

simple-policies.lisp (file)

Method: access-entry (POLICY array-replacement-policy) (ENTRY cache-entry)
Source

simple-policies.lisp (file)

Method: access-entry (POLICY linked-list-replacement-policy) (ENTRY linked-cache-entry)
Source

simple-policies.lisp (file)

Generic Function: cache-cleanup OBJECT
Package

cacle

Setf Expander

(setf cache-cleanup) (setf expander)

Methods
Method: cache-cleanup (CACHE cache)

automatically generated reader method

Source

cache.lisp (file)

Setf Expander: (setf cache-cleanup) CACHE NEW-CLEANUP
Package

cacle

Reader

cache-cleanup (generic function)

Writer

set-cache-cleanup (generic function)

Generic Function: cache-count CACHE
Package

cacle

Methods
Method: cache-count (CACHE cache)

Returns the current count of items in the cache.

Source

cache.lisp (file)

Generic Function: cache-fetch CACHE KEY &key ONLY-IF-CACHED
Package

cacle

Methods
Method: cache-fetch (CACHE cache) KEY &key ONLY-IF-CACHED

Fetch an item for the given key.
If the item is not currently in the cache, or has expired, it is fetched from the provider and stored in the cache.
If a cleanup function is defined for the cache, remember to call cache-release with the second value returned by cache-fetch!

Source

cache.lisp (file)

Generic Function: cache-flush CACHE
Package

cacle

Methods
Method: cache-flush (CACHE cache)

Flush the cache, removing all items currently stored in it. If a cleanup function is defined for the cache, it is called for every item.

Source

cache.lisp (file)

Generic Function: cache-lifetime OBJECT
Package

cacle

Setf Expander

(setf cache-lifetime) (setf expander)

Methods
Method: cache-lifetime (CACHE cache)

automatically generated reader method

Source

cache.lisp (file)

Setf Expander: (setf cache-lifetime) CACHE NEW-LIFETIME
Package

cacle

Reader

cache-lifetime (generic function)

Writer

set-cache-lifetime (generic function)

Generic Function: cache-max-size OBJECT
Package

cacle

Setf Expander

(setf cache-max-size) (setf expander)

Methods
Method: cache-max-size (CACHE cache)

automatically generated reader method

Source

cache.lisp (file)

Setf Expander: (setf cache-max-size) CACHE NEW-MAX
Package

cacle

Reader

cache-max-size (generic function)

Writer

set-cache-max-size (generic function)

Generic Function: cache-policy OBJECT
Package

cacle

Methods
Method: cache-policy (CACHE cache)

automatically generated reader method

Source

cache.lisp (file)

Generic Function: cache-provider OBJECT
Package

cacle

Setf Expander

(setf cache-provider) (setf expander)

Methods
Method: cache-provider (CACHE cache)

automatically generated reader method

Source

cache.lisp (file)

Setf Expander: (setf cache-provider) CACHE NEW-PROVIDER
Package

cacle

Reader

cache-provider (generic function)

Writer

set-cache-provider (generic function)

Generic Function: cache-release CACHE ENTRY
Package

cacle

Methods
Method: cache-release (CACHE cache) ENTRY

Releases a reference for an item fetched earlier.
An item fetched from the cache with cache-fetch will not be cleaned up before it is released.

Source

cache.lisp (file)

Generic Function: cache-remove CACHE KEY
Package

cacle

Methods
Method: cache-remove (CACHE cache) KEY

Remove the item with the specified key from the cache.

Source

cache.lisp (file)

Generic Function: cache-size CACHE
Package

cacle

Methods
Method: cache-size (CACHE cache)

Returns the current size of the cache.

Source

cache.lisp (file)

Generic Function: entry-added POLICY ENTRY
Package

cacle

Source

policy.lisp (file)

Methods
Method: entry-added (POLICY lfuda-replacement-policy) (ENTRY cache-entry)
Source

lfu-policies.lisp (file)

Method: entry-added (POLICY lfu-replacement-policy) (ENTRY cache-entry)
Source

lfu-policies.lisp (file)

Method: entry-added (POLICY array-replacement-policy) (ENTRY cache-entry)
Source

simple-policies.lisp (file)

Method: entry-added (POLICY array-replacement-policy) (ENTRY cache-entry) before
Source

simple-policies.lisp (file)

Method: entry-added (POLICY linked-list-replacement-policy) (ENTRY cache-entry)
Source

simple-policies.lisp (file)

Method: entry-added (POLICY linked-list-replacement-policy) (ENTRY cache-entry) before
Source

simple-policies.lisp (file)

Generic Function: entry-expiry OBJECT
Package

cacle

Methods
Method: entry-expiry (CACHE-ENTRY cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Generic Function: entry-index OBJECT
Generic Function: (setf entry-index) NEW-VALUE OBJECT
Package

cacle

Methods
Method: entry-index (INDEXED-CACHE-ENTRY indexed-cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Method: (setf entry-index) NEW-VALUE (INDEXED-CACHE-ENTRY indexed-cache-entry)

automatically generated writer method

Source

entry.lisp (file)

Generic Function: entry-key OBJECT
Package

cacle

Methods
Method: entry-key (CACHE-ENTRY cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Generic Function: entry-next OBJECT
Package

cacle

Methods
Method: entry-next (LINKED-CACHE-ENTRY linked-cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Generic Function: entry-previous OBJECT
Package

cacle

Methods
Method: entry-previous (LINKED-CACHE-ENTRY linked-cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Generic Function: entry-removed POLICY ENTRY
Package

cacle

Source

policy.lisp (file)

Methods
Method: entry-removed (POLICY lfu-replacement-policy) (ENTRY heap-cache-entry)
Source

lfu-policies.lisp (file)

Method: entry-removed (POLICY array-replacement-policy) (ENTRY indexed-cache-entry)
Source

simple-policies.lisp (file)

Method: entry-removed (POLICY linked-list-replacement-policy) (ENTRY linked-cache-entry)
Source

simple-policies.lisp (file)

Generic Function: entry-size OBJECT
Package

cacle

Methods
Method: entry-size (CACHE-ENTRY cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Generic Function: entry-valid-p ENTRY
Package

cacle

Methods
Method: entry-valid-p (ENTRY cache-entry)
Source

entry.lisp (file)

Generic Function: evict-entry POLICY SIZE-HINT
Package

cacle

Source

policy.lisp (file)

Methods
Method: evict-entry (POLICY lfuda-replacement-policy) SIZE-HINT
Source

lfu-policies.lisp (file)

Method: evict-entry (POLICY lfu-replacement-policy) SIZE-HINT
Source

lfu-policies.lisp (file)

Method: evict-entry (POLICY random-replacement-policy) SIZE-HINT
Source

simple-policies.lisp (file)

Method: evict-entry (POLICY lifo-replacement-policy) SIZE-HINT
Source

simple-policies.lisp (file)

Method: evict-entry (POLICY fifo-replacement-policy) SIZE-HINT
Source

simple-policies.lisp (file)

Generic Function: link-after ENTRY REF
Package

cacle

Methods
Method: link-after (ENTRY linked-cache-entry) (REF linked-cache-entry)
Source

entry.lisp (file)

Generic Function: link-before ENTRY REF
Package

cacle

Methods
Method: link-before (ENTRY linked-cache-entry) (REF linked-cache-entry)
Source

entry.lisp (file)

Generic Function: linked-list-head OBJECT
Package

cacle

Methods
Method: linked-list-head (LINKED-LIST-REPLACEMENT-POLICY linked-list-replacement-policy)

automatically generated reader method

Source

simple-policies.lisp (file)

Generic Function: unlink ENTRY
Package

cacle

Methods
Method: unlink (ENTRY linked-cache-entry)
Source

entry.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Classes

Class: cache ()
Package

cacle

Source

cache.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: max-size
Initargs

:max-size

Readers

cache-max-size (generic function)

Slot: size
Initform

0

Slot: lock
Initform

(bordeaux-threads:make-lock "cache")

Slot: hash
Slot: provider
Initargs

:provider

Readers

cache-provider (generic function)

Slot: cleanup
Initargs

:cleanup

Readers

cache-cleanup (generic function)

Slot: lifetime
Initargs

:lifetime

Readers

cache-lifetime (generic function)

Slot: policy
Initargs

:policy

Initform

:fifo

Readers

cache-policy (generic function)

Class: cache-entry ()
Package

cacle

Source

entry.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: key
Initargs

:key

Readers

entry-key (generic function)

Slot: data
Slot: pending
Initargs

:pending

Slot: busy
Initform

0

Readers

entry-busy (generic function)

Writers

(setf entry-busy) (generic function)

Slot: size
Readers

entry-size (generic function)

Slot: expiry
Readers

entry-expiry (generic function)

Class: fifo-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

linked-list-replacement-policy (class)

Direct subclasses

lru-replacement-policy (class)

Direct methods

evict-entry (method)

Class: indexed-cache-entry ()
Package

cacle

Source

entry.lisp (file)

Direct superclasses

cache-entry (class)

Direct subclasses

heap-cache-entry (class)

Direct methods
Direct slots
Slot: index
Readers

entry-index (generic function)

Writers

(setf entry-index) (generic function)

Class: lfu-replacement-policy ()
Package

cacle

Source

lfu-policies.lisp (file)

Direct superclasses

replacement-policy (class)

Direct subclasses

lfuda-replacement-policy (class)

Direct methods
Direct slots
Slot: heap
Initform

(make-array 16 :adjustable t :fill-pointer 0)

Class: lfuda-replacement-policy ()
Package

cacle

Source

lfu-policies.lisp (file)

Direct superclasses

lfu-replacement-policy (class)

Direct methods
Direct slots
Slot: age
Initform

0

Class: lifo-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

linked-list-replacement-policy (class)

Direct subclasses

mru-replacement-policy (class)

Direct methods

evict-entry (method)

Class: linked-cache-entry ()
Package

cacle

Source

entry.lisp (file)

Direct superclasses

cache-entry (class)

Direct methods
Direct slots
Slot: next
Readers

entry-next (generic function)

Slot: prev
Readers

entry-previous (generic function)

Class: linked-list-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

replacement-policy (class)

Direct subclasses
Direct methods
Direct slots
Slot: head
Initform

(make-instance (quote cacle:linked-cache-entry))

Readers

linked-list-head (generic function)

Class: lru-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

fifo-replacement-policy (class)

Direct methods

access-entry (method)

Class: mru-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

lifo-replacement-policy (class)

Direct methods

access-entry (method)

Class: random-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

array-replacement-policy (class)

Direct methods

evict-entry (method)

Class: replacement-policy ()
Package

cacle

Source

policy.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *cleanup-list*
Package

cacle

Source

cache.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Macros

Macro: with-collected-cleanups (CACHE) &body BODY
Package

cacle

Source

cache.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Functions

Function: bubble-up HEAP IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: ensure-cache-size CACHE
Package

cacle

Source

cache.lisp (file)

Function: ensure-unlinked ENTRY
Package

cacle

Source

entry.lisp (file)

Function: heap-left HEAP IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: heap-left-idx IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: heap-parent HEAP IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: heap-parent-idx IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: heap-right HEAP IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: heap-right-idx IDX
Package

cacle

Source

lfu-policies.lisp (file)

Function: heap-swap HEAP I1 I2
Package

cacle

Source

lfu-policies.lisp (file)

Function: prepare-cleanup ENTRY HASH
Package

cacle

Source

cache.lisp (file)

Function: sink-down HEAP IDX &optional PREFER-TO-SINK
Package

cacle

Source

lfu-policies.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Generic functions

Generic Function: cache-entry-weight OBJECT
Generic Function: (setf cache-entry-weight) NEW-VALUE OBJECT
Package

cacle

Methods
Method: cache-entry-weight (HEAP-CACHE-ENTRY heap-cache-entry)

automatically generated reader method

Source

lfu-policies.lisp (file)

Method: (setf cache-entry-weight) NEW-VALUE (HEAP-CACHE-ENTRY heap-cache-entry)

automatically generated writer method

Source

lfu-policies.lisp (file)

Generic Function: cache-sanity-check CACHE
Package

cacle

Methods
Method: cache-sanity-check (CACHE cache)
Source

cache.lisp (file)

Generic Function: entry-busy OBJECT
Generic Function: (setf entry-busy) NEW-VALUE OBJECT
Package

cacle

Methods
Method: entry-busy (CACHE-ENTRY cache-entry)

automatically generated reader method

Source

entry.lisp (file)

Method: (setf entry-busy) NEW-VALUE (CACHE-ENTRY cache-entry)

automatically generated writer method

Source

entry.lisp (file)

Generic Function: set-cache-cleanup CACHE NEW-CLEANUP
Package

cacle

Setf Expander

(setf cache-cleanup) (setf expander)

Methods
Method: set-cache-cleanup (CACHE cache) NEW-CLEANUP
Source

cache.lisp (file)

Generic Function: set-cache-lifetime CACHE NEW-LIFETIME
Package

cacle

Setf Expander

(setf cache-lifetime) (setf expander)

Methods
Method: set-cache-lifetime (CACHE cache) NEW-LIFETIME
Source

cache.lisp (file)

Generic Function: set-cache-max-size CACHE NEW-MAX
Package

cacle

Setf Expander

(setf cache-max-size) (setf expander)

Methods
Method: set-cache-max-size (CACHE cache) NEW-MAX
Source

cache.lisp (file)

Generic Function: set-cache-provider CACHE NEW-PROVIDER
Package

cacle

Setf Expander

(setf cache-provider) (setf expander)

Methods
Method: set-cache-provider (CACHE cache) NEW-PROVIDER
Source

cache.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Classes

Class: array-replacement-policy ()
Package

cacle

Source

simple-policies.lisp (file)

Direct superclasses

replacement-policy (class)

Direct subclasses

random-replacement-policy (class)

Direct methods
Direct slots
Slot: data
Initform

(make-array 16 :adjustable t :fill-pointer 0)

Slot: unused
Initform

(make-array 16 :adjustable t :fill-pointer 0)

Class: heap-cache-entry ()
Package

cacle

Source

lfu-policies.lisp (file)

Direct superclasses

indexed-cache-entry (class)

Direct methods
Direct slots
Slot: weight
Readers

cache-entry-weight (generic function)

Writers

(setf cache-entry-weight) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cacle.asd: The cacle<dot>asd file
cacle/cacle: The cacle/cacle module
cacle/cacle/cache.lisp: The cacle/cacle/cache<dot>lisp file
cacle/cacle/entry.lisp: The cacle/cacle/entry<dot>lisp file
cacle/cacle/lfu-policies.lisp: The cacle/cacle/lfu-policies<dot>lisp file
cacle/cacle/package.lisp: The cacle/cacle/package<dot>lisp file
cacle/cacle/policy.lisp: The cacle/cacle/policy<dot>lisp file
cacle/cacle/simple-policies.lisp: The cacle/cacle/simple-policies<dot>lisp file
cacle/cacle/testsuite.lisp: The cacle/cacle/testsuite<dot>lisp file

F
File, Lisp, cacle.asd: The cacle<dot>asd file
File, Lisp, cacle/cacle/cache.lisp: The cacle/cacle/cache<dot>lisp file
File, Lisp, cacle/cacle/entry.lisp: The cacle/cacle/entry<dot>lisp file
File, Lisp, cacle/cacle/lfu-policies.lisp: The cacle/cacle/lfu-policies<dot>lisp file
File, Lisp, cacle/cacle/package.lisp: The cacle/cacle/package<dot>lisp file
File, Lisp, cacle/cacle/policy.lisp: The cacle/cacle/policy<dot>lisp file
File, Lisp, cacle/cacle/simple-policies.lisp: The cacle/cacle/simple-policies<dot>lisp file
File, Lisp, cacle/cacle/testsuite.lisp: The cacle/cacle/testsuite<dot>lisp file

L
Lisp File, cacle.asd: The cacle<dot>asd file
Lisp File, cacle/cacle/cache.lisp: The cacle/cacle/cache<dot>lisp file
Lisp File, cacle/cacle/entry.lisp: The cacle/cacle/entry<dot>lisp file
Lisp File, cacle/cacle/lfu-policies.lisp: The cacle/cacle/lfu-policies<dot>lisp file
Lisp File, cacle/cacle/package.lisp: The cacle/cacle/package<dot>lisp file
Lisp File, cacle/cacle/policy.lisp: The cacle/cacle/policy<dot>lisp file
Lisp File, cacle/cacle/simple-policies.lisp: The cacle/cacle/simple-policies<dot>lisp file
Lisp File, cacle/cacle/testsuite.lisp: The cacle/cacle/testsuite<dot>lisp file

M
Module, cacle/cacle: The cacle/cacle module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   B   C   E   F   G   H   L   M   P   S   U   W  
Index Entry  Section

(
(setf cache-cleanup): Exported generic functions
(setf cache-entry-weight): Internal generic functions
(setf cache-entry-weight): Internal generic functions
(setf cache-lifetime): Exported generic functions
(setf cache-max-size): Exported generic functions
(setf cache-provider): Exported generic functions
(setf entry-busy): Internal generic functions
(setf entry-busy): Internal generic functions
(setf entry-index): Exported generic functions
(setf entry-index): Exported generic functions

A
access-entry: Exported generic functions
access-entry: Exported generic functions
access-entry: Exported generic functions
access-entry: Exported generic functions
access-entry: Exported generic functions
access-entry: Exported generic functions

B
bubble-up: Internal functions

C
cache-cleanup: Exported generic functions
cache-cleanup: Exported generic functions
cache-count: Exported generic functions
cache-count: Exported generic functions
cache-entry-weight: Internal generic functions
cache-entry-weight: Internal generic functions
cache-fetch: Exported generic functions
cache-fetch: Exported generic functions
cache-flush: Exported generic functions
cache-flush: Exported generic functions
cache-lifetime: Exported generic functions
cache-lifetime: Exported generic functions
cache-max-size: Exported generic functions
cache-max-size: Exported generic functions
cache-policy: Exported generic functions
cache-policy: Exported generic functions
cache-provider: Exported generic functions
cache-provider: Exported generic functions
cache-release: Exported generic functions
cache-release: Exported generic functions
cache-remove: Exported generic functions
cache-remove: Exported generic functions
cache-sanity-check: Internal generic functions
cache-sanity-check: Internal generic functions
cache-size: Exported generic functions
cache-size: Exported generic functions

E
ensure-cache-size: Internal functions
ensure-unlinked: Internal functions
entry-added: Exported generic functions
entry-added: Exported generic functions
entry-added: Exported generic functions
entry-added: Exported generic functions
entry-added: Exported generic functions
entry-added: Exported generic functions
entry-added: Exported generic functions
entry-busy: Internal generic functions
entry-busy: Internal generic functions
entry-expiry: Exported generic functions
entry-expiry: Exported generic functions
entry-index: Exported generic functions
entry-index: Exported generic functions
entry-key: Exported generic functions
entry-key: Exported generic functions
entry-next: Exported generic functions
entry-next: Exported generic functions
entry-previous: Exported generic functions
entry-previous: Exported generic functions
entry-removed: Exported generic functions
entry-removed: Exported generic functions
entry-removed: Exported generic functions
entry-removed: Exported generic functions
entry-size: Exported generic functions
entry-size: Exported generic functions
entry-valid-p: Exported generic functions
entry-valid-p: Exported generic functions
evict-entry: Exported generic functions
evict-entry: Exported generic functions
evict-entry: Exported generic functions
evict-entry: Exported generic functions
evict-entry: Exported generic functions
evict-entry: Exported generic functions

F
Function, bubble-up: Internal functions
Function, ensure-cache-size: Internal functions
Function, ensure-unlinked: Internal functions
Function, heap-left: Internal functions
Function, heap-left-idx: Internal functions
Function, heap-parent: Internal functions
Function, heap-parent-idx: Internal functions
Function, heap-right: Internal functions
Function, heap-right-idx: Internal functions
Function, heap-swap: Internal functions
Function, make-cache: Exported functions
Function, prepare-cleanup: Internal functions
Function, sink-down: Internal functions

G
Generic Function, (setf cache-entry-weight): Internal generic functions
Generic Function, (setf entry-busy): Internal generic functions
Generic Function, (setf entry-index): Exported generic functions
Generic Function, access-entry: Exported generic functions
Generic Function, cache-cleanup: Exported generic functions
Generic Function, cache-count: Exported generic functions
Generic Function, cache-entry-weight: Internal generic functions
Generic Function, cache-fetch: Exported generic functions
Generic Function, cache-flush: Exported generic functions
Generic Function, cache-lifetime: Exported generic functions
Generic Function, cache-max-size: Exported generic functions
Generic Function, cache-policy: Exported generic functions
Generic Function, cache-provider: Exported generic functions
Generic Function, cache-release: Exported generic functions
Generic Function, cache-remove: Exported generic functions
Generic Function, cache-sanity-check: Internal generic functions
Generic Function, cache-size: Exported generic functions
Generic Function, entry-added: Exported generic functions
Generic Function, entry-busy: Internal generic functions
Generic Function, entry-expiry: Exported generic functions
Generic Function, entry-index: Exported generic functions
Generic Function, entry-key: Exported generic functions
Generic Function, entry-next: Exported generic functions
Generic Function, entry-previous: Exported generic functions
Generic Function, entry-removed: Exported generic functions
Generic Function, entry-size: Exported generic functions
Generic Function, entry-valid-p: Exported generic functions
Generic Function, evict-entry: Exported generic functions
Generic Function, link-after: Exported generic functions
Generic Function, link-before: Exported generic functions
Generic Function, linked-list-head: Exported generic functions
Generic Function, set-cache-cleanup: Internal generic functions
Generic Function, set-cache-lifetime: Internal generic functions
Generic Function, set-cache-max-size: Internal generic functions
Generic Function, set-cache-provider: Internal generic functions
Generic Function, unlink: Exported generic functions

H
heap-left: Internal functions
heap-left-idx: Internal functions
heap-parent: Internal functions
heap-parent-idx: Internal functions
heap-right: Internal functions
heap-right-idx: Internal functions
heap-swap: Internal functions

L
link-after: Exported generic functions
link-after: Exported generic functions
link-before: Exported generic functions
link-before: Exported generic functions
linked-list-head: Exported generic functions
linked-list-head: Exported generic functions

M
Macro, with-cache-fetch: Exported macros
Macro, with-collected-cleanups: Internal macros
make-cache: Exported functions
Method, (setf cache-entry-weight): Internal generic functions
Method, (setf entry-busy): Internal generic functions
Method, (setf entry-index): Exported generic functions
Method, access-entry: Exported generic functions
Method, access-entry: Exported generic functions
Method, access-entry: Exported generic functions
Method, access-entry: Exported generic functions
Method, access-entry: Exported generic functions
Method, cache-cleanup: Exported generic functions
Method, cache-count: Exported generic functions
Method, cache-entry-weight: Internal generic functions
Method, cache-fetch: Exported generic functions
Method, cache-flush: Exported generic functions
Method, cache-lifetime: Exported generic functions
Method, cache-max-size: Exported generic functions
Method, cache-policy: Exported generic functions
Method, cache-provider: Exported generic functions
Method, cache-release: Exported generic functions
Method, cache-remove: Exported generic functions
Method, cache-sanity-check: Internal generic functions
Method, cache-size: Exported generic functions
Method, entry-added: Exported generic functions
Method, entry-added: Exported generic functions
Method, entry-added: Exported generic functions
Method, entry-added: Exported generic functions
Method, entry-added: Exported generic functions
Method, entry-added: Exported generic functions
Method, entry-busy: Internal generic functions
Method, entry-expiry: Exported generic functions
Method, entry-index: Exported generic functions
Method, entry-key: Exported generic functions
Method, entry-next: Exported generic functions
Method, entry-previous: Exported generic functions
Method, entry-removed: Exported generic functions
Method, entry-removed: Exported generic functions
Method, entry-removed: Exported generic functions
Method, entry-size: Exported generic functions
Method, entry-valid-p: Exported generic functions
Method, evict-entry: Exported generic functions
Method, evict-entry: Exported generic functions
Method, evict-entry: Exported generic functions
Method, evict-entry: Exported generic functions
Method, evict-entry: Exported generic functions
Method, link-after: Exported generic functions
Method, link-before: Exported generic functions
Method, linked-list-head: Exported generic functions
Method, set-cache-cleanup: Internal generic functions
Method, set-cache-lifetime: Internal generic functions
Method, set-cache-max-size: Internal generic functions
Method, set-cache-provider: Internal generic functions
Method, unlink: Exported generic functions

P
prepare-cleanup: Internal functions

S
set-cache-cleanup: Internal generic functions
set-cache-cleanup: Internal generic functions
set-cache-lifetime: Internal generic functions
set-cache-lifetime: Internal generic functions
set-cache-max-size: Internal generic functions
set-cache-max-size: Internal generic functions
set-cache-provider: Internal generic functions
set-cache-provider: Internal generic functions
Setf Expander, (setf cache-cleanup): Exported generic functions
Setf Expander, (setf cache-lifetime): Exported generic functions
Setf Expander, (setf cache-max-size): Exported generic functions
Setf Expander, (setf cache-provider): Exported generic functions
sink-down: Internal functions

U
unlink: Exported generic functions
unlink: Exported generic functions

W
with-cache-fetch: Exported macros
with-collected-cleanups: Internal macros

Jump to:   (  
A   B   C   E   F   G   H   L   M   P   S   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   B   C   D   E   H   I   K   L   M   N   P   S   U   W  
Index Entry  Section

*
*cleanup-list*: Internal special variables

A
age: Exported classes

B
busy: Exported classes

C
cleanup: Exported classes

D
data: Exported classes
data: Internal classes

E
expiry: Exported classes

H
hash: Exported classes
head: Exported classes
heap: Exported classes

I
index: Exported classes

K
key: Exported classes

L
lifetime: Exported classes
lock: Exported classes

M
max-size: Exported classes

N
next: Exported classes

P
pending: Exported classes
policy: Exported classes
prev: Exported classes
provider: Exported classes

S
size: Exported classes
size: Exported classes
Slot, age: Exported classes
Slot, busy: Exported classes
Slot, cleanup: Exported classes
Slot, data: Exported classes
Slot, data: Internal classes
Slot, expiry: Exported classes
Slot, hash: Exported classes
Slot, head: Exported classes
Slot, heap: Exported classes
Slot, index: Exported classes
Slot, key: Exported classes
Slot, lifetime: Exported classes
Slot, lock: Exported classes
Slot, max-size: Exported classes
Slot, next: Exported classes
Slot, pending: Exported classes
Slot, policy: Exported classes
Slot, prev: Exported classes
Slot, provider: Exported classes
Slot, size: Exported classes
Slot, size: Exported classes
Slot, unused: Internal classes
Slot, weight: Internal classes
Special Variable, *cleanup-list*: Internal special variables

U
unused: Internal classes

W
weight: Internal classes

Jump to:   *  
A   B   C   D   E   H   I   K   L   M   N   P   S   U   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   F   H   I   L   M   P   R   S  
Index Entry  Section

A
array-replacement-policy: Internal classes

C
cache: Exported classes
cache-entry: Exported classes
cacle: The cacle system
cacle: The cacle package
cacle-system: The cacle-system package
Class, array-replacement-policy: Internal classes
Class, cache: Exported classes
Class, cache-entry: Exported classes
Class, fifo-replacement-policy: Exported classes
Class, heap-cache-entry: Internal classes
Class, indexed-cache-entry: Exported classes
Class, lfu-replacement-policy: Exported classes
Class, lfuda-replacement-policy: Exported classes
Class, lifo-replacement-policy: Exported classes
Class, linked-cache-entry: Exported classes
Class, linked-list-replacement-policy: Exported classes
Class, lru-replacement-policy: Exported classes
Class, mru-replacement-policy: Exported classes
Class, random-replacement-policy: Exported classes
Class, replacement-policy: Exported classes

F
fifo-replacement-policy: Exported classes

H
heap-cache-entry: Internal classes

I
indexed-cache-entry: Exported classes

L
lfu-replacement-policy: Exported classes
lfuda-replacement-policy: Exported classes
lifo-replacement-policy: Exported classes
linked-cache-entry: Exported classes
linked-list-replacement-policy: Exported classes
lru-replacement-policy: Exported classes

M
mru-replacement-policy: Exported classes

P
Package, cacle: The cacle package
Package, cacle-system: The cacle-system package

R
random-replacement-policy: Exported classes
replacement-policy: Exported classes

S
System, cacle: The cacle system

Jump to:   A   C   F   H   I   L   M   P   R   S