Jump to content
ELSTP

Simple redis access extension

Recommended Posts

 

1.jpg

The following code can only be used on the server. Do not write it in the task file. It is recommended that you create a separate mod mount to avoid revealing RedIS information

Connect to redIS server first after server initialization (connection can only fail once and can be failed multiple times)

 

Parameters: [IP, port, password]
Redis has a password:
"ArmaMapsExt_x64" callExtension ["connectRedis",["127.0.0.1","6379","123456"]]
Redis password free:
"ArmaMapsExt_x64" callExtension ["connectRedis",["127.0.0.1","6379"]]




Store a string to the RedIS cache server

Parameters: [key, value]

Cache indefinitely:
"ArmaMapsExt" callExtension ["sendMsg",["usename","abc"]]
Cache expiration (in seconds):
"ArmaMapsExt" callExtension ["sendMsg",["usename","abc","60"]]




Gets a cached string from the key

parameters:[key]
_data = "ArmaMapsExt" callExtension ["getMsg",["username"]]


Returns the value if the cache is hit, otherwise returns an empty string


Note: the whole process can only be executed on the server!
Modules can also only be mounted on the server

If you are using client test, please close battleye first, otherwise it will block the load!

 

 

link:

workshop

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×