Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phawk/dalli-ui
A web UI for Dalli
https://github.com/phawk/dalli-ui
Last synced: about 2 months ago
JSON representation
A web UI for Dalli
- Host: GitHub
- URL: https://github.com/phawk/dalli-ui
- Owner: phawk
- License: mit
- Created: 2014-10-04T09:23:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-22T23:10:40.000Z (over 9 years ago)
- Last Synced: 2024-04-30T03:42:44.079Z (8 months ago)
- Language: Ruby
- Size: 218 KB
- Stars: 18
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Dalli UI
[![Build Status](https://travis-ci.org/phawk/dalli-ui.svg?branch=master)](https://travis-ci.org/phawk/dalli-ui) [![Gem Version](https://badge.fury.io/rb/dalli-ui.svg)](http://badge.fury.io/rb/dalli-ui)
Dalli UI is a mountable engine for Rails apps that displays information about your [dalli](https://github.com/mperham/dalli) memcached instance and allows you to flush it from a web interface.
![Dalli UI Sample](./images/sample.png)
## Rails 4 installation
Add **dalli** and **dalli-ui** to your gemfile and `bundle install`.
```rb
# Gemfile
gem 'dalli'
gem 'dalli-ui'
```Setup [dalli](https://github.com/mperham/dalli) as your Rails cache store.
```rb
# config/application.rb
config.cache_store = :dalli_store
```Mount Dalli UI on a route of your choosing
```rb
# config/routes.rb
mount Dalli::Ui::Engine, at: "dalli"
```In a production environment you probably don't want to allow just anyone to access this page.
Authentication example with [Devise](https://github.com/plataformatec/devise) that ensures that the user is an admin:
```rb
# config/routes.rb
authenticate :user, lambda { |u| u.admin? } do
mount Dalli::Ui::Engine, at: "dalli"
end
```