-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathClient.bal
More file actions
45 lines (37 loc) · 1.24 KB
/
Copy pathClient.bal
File metadata and controls
45 lines (37 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import ballerina/io;
import distributed_cache as cache;
import ballerina/runtime;
import ballerina/log;
import ballerina/http;
import ballerina/config;
public function main(string... args) {
cache:connectToCluster();
cache:Cache oauthCache = new("oauthCache",expiryTimeMillis=30000);
oauthCache.put("1", "1");
oauthCache.put("2", "2");
oauthCache.put("3", "3");
//io:println(<string>oauthCache.get("1"));
oauthCache.put("4", "4");
oauthCache.put("5", "5");
oauthCache.put("6", "6");
//oauthCache.put("7", "7");
//oauthCache.put("8", "8");
//oauthCache.put("9", "9");
//oauthCache.put("10", "10");
//oauthCache.put("11", "11");
//io:println(<string>oauthCache.get("1"));
//oauthCache.remove ("1");
io:println(oauthCache.get("1"));
io:println(oauthCache.get("2"));
io:println(oauthCache.get("3"));
io:println(oauthCache.get("4"));
io:println(oauthCache.get("5"));
io:println(oauthCache.get("6"));
//io:println(oauthCache.get("7"));
//io:println(oauthCache.get("8"));
//io:println(oauthCache.get("9"));
//io:println(oauthCache.get("10"));
//io:println(oauthCache.get("11"));
//io:println(<string>oauthCache.get("Name"));
// runtime:sleep(100000000);
}