summaryrefslogtreecommitdiff
path: root/tests/modules/cache/test.lua
blob: 90081d155b73658057796c690d3366c91ba3e7f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import("core.cache.memcache")

function test_memcache(t)
    memcache.set2("mycache", "foo", "bar", "1")
    t:are_equal(memcache.get2("mycache", "foo", "bar"), "1")
    memcache.clear("mycache")
    t:are_equal(memcache.get2("mycache", "foo", "bar"), nil)
    memcache.set2("mycache", "foo", "bar", "1")
    memcache.clear()
    t:are_equal(memcache.get2("mycache", "foo", "bar"), nil)
end