minor fix to README

This commit is contained in:
Dmitry Kolesnikov 2013-07-27 18:46:12 +03:00
parent 916366089c
commit 1b4edeb9cc

View File

@ -15,7 +15,7 @@ The downside is inability to assign precise TTL per single cache entry. TTL is a
## Usage ## Usage
```erlang ```erlang
application:start(cache). application:start(cache).
{ok, _} = cache:start_link(my_cache, [{n, 10}, {ttl, 60}]). {ok, _} = cache:start_link(my_cache, [{n, 10}, {ttl, 60}]).
ok = cache:put(my_cache, <<"my key">>, <<"my value">>). ok = cache:put(my_cache, <<"my key">>, <<"my value">>).
@ -42,7 +42,7 @@ Therefore, frequent read/write of large entries might impact on overall Erlang p
The global cache instance is visible to all Erlang nodes in the cluster. The global cache instance is visible to all Erlang nodes in the cluster.
```erlang ```erlang
%% at a@example.com %% at a@example.com
{ok, _} = cache:start_link({global, my_cache}, [{n, 10}, {ttl, 60}]). {ok, _} = cache:start_link({global, my_cache}, [{n, 10}, {ttl, 60}]).
Val = cache:get({global, my_cache}, <<"my key">>). Val = cache:get({global, my_cache}, <<"my key">>).
@ -67,9 +67,15 @@ The local cache instance is accessible for any Erlang nodes in the cluster.
## Performance ## Performance
MacBook Pro, Intel Core i5, 2.5GHz, 8GB 1600 MHz DDR3, 256 SSD MacBook Pro, Intel Core i5, 2.5GHz, 8GB 1600 MHz DDR3, 256 SSD
LRU Cache, 10 segments, 20 sec ttl (~2 sec per segment) LRU Cache, 10 segments, 20 sec ttl (~2 sec per segment)
Local cache (application and cache within same VM)
![Local cache (application and cache within same VM)](local.png) ![Local cache (application and cache within same VM)](local.png)
Distributed cache (application and cache runs in different VMs)
![Distributed cache (application and cache runs in different VMs)](distributed.png) ![Distributed cache (application and cache runs in different VMs)](distributed.png)
## Contributors ## Contributors