Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grantmcconnaughey/grails-cache-manager
A simple admin interface to manage the various caches in a Grails app
https://github.com/grantmcconnaughey/grails-cache-manager
Last synced: 29 days ago
JSON representation
A simple admin interface to manage the various caches in a Grails app
- Host: GitHub
- URL: https://github.com/grantmcconnaughey/grails-cache-manager
- Owner: grantmcconnaughey
- Created: 2014-12-04T22:01:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-07T20:32:14.000Z (about 10 years ago)
- Last Synced: 2023-08-15T07:49:05.621Z (over 1 year ago)
- Language: Groovy
- Homepage:
- Size: 193 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Grails Cache Manager Plugin
**A simple admin interface to manage the various caches in a Grails app.**
![Screenshot](https://dl.dropboxusercontent.com/u/11285872/cache-manager2.png)
## Installation
To install the latest version of the plugin add this to your `BuildConfig.groovy` in the plugins section (be sure to use the latest version):
```groovy
compile ':cache-manager:1.0.0'
```## Compatibility
This plugin is currently only compatible with the [Grails Cache Plugin](http://grails.org/plugin/cache) by itself or with the Grails Cache Plugin and [Ehcache Cache Plugin](http://grails.org/plugin/cache-ehcache) together. If the Ehcache Cache Plugin is also installed then the cache manager interface will including settings for Time To Live and disabling/enabling a cache.
## Usage
This plugin contains a single admin view for controller the caches in a Grails app. Navigate to `/cacheManager/` to view the caches. This interface allows you to do the following:
### Bulk Manage Caches
* Clear All Caches
* Clear Blocks Cache
* Clear Templates Cache### Manage Individual Caches
* View the caches in your app
* Clear a cache### Manage Individual Caches (with Ehcache Plugin)
* View a cache's current Time To Live
* Set a new Time To Live for a cache
* Disable and enable a cache## Configuration
The Grails Cache Manager Plugin allows configuration to change the look and functionality of the interface. **All config values start with** `grails.plugin.cachemanager`**.**
| Name | Default | Description |
| -------------------- | ------------ | ---------------------------------------------------------------------------------------- |
| `excludedCacheNames` | `[]` | A list of cache names that should not be included in the cache manager page. |
| `clearOnNewTTL` | `true` | True if the cache manager should clear a cache when its Time To Live setting is changed. |
| `layout` | `"main"` | The layout to use for the cache manager. |
| `newTTLValues` | `[0: 'None (Disable Cache)', (60 * 60): 'One Hour', (60 * 60 * 24): 'One Day', (60 * 60 * 24 * 7): 'One Week']` | A Map for the New Time To Live select box, where the key is the new TTL and the value is a String containing the value's description. |## Security
You will likely want to restrict access to the cache manager when you deploy a live app using this plugin. The URL path `/cacheManager/**` should be secured.
### Spring Security Example
```groovy
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
'/cachemanager/**': ['ROLE_ADMIN']
]
```