You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-43
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,23 @@ d.delete("one") # delete one item from stack
46
46
print(d.set("three", 3)) # True
47
47
```
48
48
49
+
# Asynchronous
50
+
51
+
example asynchronous usage
52
+
53
+
```python
54
+
import asyncio
55
+
from zcache import AsyncCache
56
+
57
+
asyncdefmain():
58
+
c =await AsyncCache()
59
+
await c.set("test", "OK")
60
+
print(await c.get("test"))
61
+
62
+
if__name__=='__main__':
63
+
asyncio.run(main())
64
+
```
65
+
49
66
# Storage and plugins
50
67
51
68
you can change storage and use plugins, for example:
@@ -59,57 +76,26 @@ c = Cache(storage=BaseFileStorage, plugins=BytesCachePlugins)
59
76
```
60
77
see list current available [storage](https://github.com/guangrei/zcache/tree/main/zcache/Storage) and [plugins](https://github.com/guangrei/zcache/tree/main/zcache/Plugins), you can also create your own storage and plugins.
61
78
62
-
##Extras
79
+
# Extras
63
80
64
-
[extras](https://github.com/guangrei/zcache/tree/main/zcache/Extras) is several function based on zcache.
81
+
[Extras](https://github.com/guangrei/zcache/tree/main/zcache/Extras) is several function based on zcache.
0 commit comments