Toshihiko Aliyun OCS (Cache Layout)
The Aliyun OCS support for Toshihiko as an addon.
Installation
$ npm install toshihiko-aliyun-ocs --save
How to Use
When you define a Toshihiko, you could pass the object into cache
option:
var T = ;var toshihiko = "database" "username" "" cache: name: "aliyun-ocs" host: "ALIYUN_OCS_HOST" port: 11211 username: "ALIYUN_OCS_USERNAME" password: "ALIYUN_OCS_PASSWORD" options: prefix: "_" ;
name
must bealiyun-ocs
and then Toshihiko will search for the packagetoshihiko-aliyun-ocs
.You can give a
prefix
inoptions
.
Otherwise, you may create this object by yourself and pass the created object into cached:
var OCS = ;var object = Memcached;var toshihiko = DATABASE USERNAME PASSWORD cache: object;
or
var Memcached = ;var object = HOST PORT USERNAME PASSWORD OPTIONS;var toshihiko = DATABASE USERNAME PASSWORD cache: object;
And then you may enjoy the cache layer of Toshihiko!
Contribution
You're welcome to make pull requests or issues!
「雖然我覺得不怎麼可能有人會關注我」