Skip to content

Commit c8ff13f

Browse files
committed
docs: Format table
1 parent 287b535 commit c8ff13f

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,27 @@ cache.StartJanitor()
6565
```
6666

6767
### Functions
68-
| Function | Description |
69-
| --------------------------------- | ----------- |
70-
| WithMaxSize | Sets the max size of the cache. `gocache.NoMaxSize` means there is no limit. If not set, the default max size is `gocache.DefaultMaxSize`.
71-
| WithMaxMemoryUsage | Sets the max memory usage of the cache. `gocache.NoMaxMemoryUsage` means there is no limit. The default behavior is to not evict based on memory usage.
72-
| WithEvictionPolicy | Sets the eviction algorithm to be used when the cache reaches the max size. If not set, the default eviction policy is `gocache.FirstInFirstOut` (FIFO).
73-
| WithForceNilInterfaceOnNilPointer | Configures whether values with a nil pointer passed to write functions should be forcefully set to nil. Defaults to true.
74-
| StartJanitor | Starts the janitor, which is in charge of deleting expired cache entries in the background.
75-
| StopJanitor | Stops the janitor.
76-
| Set | Same as `SetWithTTL`, but with no expiration (`gocache.NoExpiration`)
77-
| SetAll | Same as `Set`, but in bulk
78-
| SetWithTTL | Creates or updates a cache entry with the given key, value and expiration time. If the max size after the aforementioned operation is above the configured max size, the tail will be evicted. Depending on the eviction policy, the tail is defined as the oldest
79-
| Get | Gets a cache entry by its key.
80-
| GetByKeys | Gets a map of entries by their keys. The resulting map will contain all keys, even if some of the keys in the slice passed as parameter were not present in the cache.
81-
| GetAll | Gets all cache entries.
82-
| GetKeysByPattern | Retrieves a slice of keys that matches a given pattern.
83-
| Delete | Removes a key from the cache.
84-
| DeleteAll | Removes multiple keys from the cache.
85-
| Count | Gets the size of the cache. This includes cache keys which may have already expired, but have not been removed yet.
86-
| Clear | Wipes the cache.
87-
| TTL | Gets the time until a cache key expires.
88-
| Expire | Sets the expiration time of an existing cache key.
68+
| Function | Description |
69+
|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
70+
| WithMaxSize | Sets the max size of the cache. `gocache.NoMaxSize` means there is no limit. If not set, the default max size is `gocache.DefaultMaxSize`. |
71+
| WithMaxMemoryUsage | Sets the max memory usage of the cache. `gocache.NoMaxMemoryUsage` means there is no limit. The default behavior is to not evict based on memory usage. |
72+
| WithEvictionPolicy | Sets the eviction algorithm to be used when the cache reaches the max size. If not set, the default eviction policy is `gocache.FirstInFirstOut` (FIFO). |
73+
| WithForceNilInterfaceOnNilPointer | Configures whether values with a nil pointer passed to write functions should be forcefully set to nil. Defaults to true. |
74+
| StartJanitor | Starts the janitor, which is in charge of deleting expired cache entries in the background. |
75+
| StopJanitor | Stops the janitor. |
76+
| Set | Same as `SetWithTTL`, but with no expiration (`gocache.NoExpiration`) |
77+
| SetAll | Same as `Set`, but in bulk |
78+
| SetWithTTL | Creates or updates a cache entry with the given key, value and expiration time. If the max size after the aforementioned operation is above the configured max size, the tail will be evicted. Depending on the eviction policy, the tail is defined as the oldest |
79+
| Get | Gets a cache entry by its key. |
80+
| GetByKeys | Gets a map of entries by their keys. The resulting map will contain all keys, even if some of the keys in the slice passed as parameter were not present in the cache. |
81+
| GetAll | Gets all cache entries. |
82+
| GetKeysByPattern | Retrieves a slice of keys that matches a given pattern. |
83+
| Delete | Removes a key from the cache. |
84+
| DeleteAll | Removes multiple keys from the cache. |
85+
| Count | Gets the size of the cache. This includes cache keys which may have already expired, but have not been removed yet. |
86+
| Clear | Wipes the cache. |
87+
| TTL | Gets the time until a cache key expires. |
88+
| Expire | Sets the expiration time of an existing cache key. |
8989

9090
For further documentation, please refer to [Go Reference](https://pkg.go.dev/github.com/TwiN/gocache)
9191

0 commit comments

Comments
 (0)