Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weixin_authorize
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
weixin_authorize
Commits
676c8751
Commit
676c8751
authored
Mar 21, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated README.md
parent
f5139fa6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
README.md
+10
-4
No files found.
README.md
View file @
676c8751
...
@@ -42,12 +42,18 @@ $client ||= WeixinAuthorize::Client.new(ENV["APPID"], ENV["APPSECRET"], "your_st
...
@@ -42,12 +42,18 @@ $client ||= WeixinAuthorize::Client.new(ENV["APPID"], ENV["APPSECRET"], "your_st
require "redis"
require "redis"
require "redis-namespace"
require "redis-namespace"
require "weixin_authorize"
require "weixin_authorize"
# don't forget change namespace
# don't forget change namespace
redis = Redis.new(:host => "127.0.0.1",:port => "6379")
namespace = "your_app_name_weixin:weixin_authorize"
# We suggest you use a special db in Redis, when you need to clear all data, you can use flushdb command to clear them.
redis = Redis.new(:host => "127.0.0.1",:port => "6379", :db => 15)
redis.select(3)
# Delete the current namespace keys when restart everytime.
exist_keys = redis.keys("#{namespace}:*")
exist_keys.each{|key|redis.del(key)}
# Give a special namespace as prefix for Redis key, when your have more than one project used weixin_authorize, this config will make them work fine.
# Give a special namespace as prefix for Redis key, when your have more than one project used weixin_authorize, this config will make them work fine.
redis = Redis::Namespace.new("your_app_name:weixin_authorize", :redis => redis)
redis = Redis::Namespace.new("#{namespace}", :redis => redis)
WeixinAuthorize.configure do |config|
WeixinAuthorize.configure do |config|
config.redis = redis
config.redis = redis
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment