Skip to content
Discussion options

You must be logged in to vote

use memcache

target("foo")
    on_load(function (target)
        import("core.cache.memcache")
        memcache.set("cachename", "key", "value")
    end)

target("bar")
    on_load(function (target)
        import("core.cache.memcache")
        local memcache.get("cachename", "key")
    end)

use target:data()

target("foo")
    on_load(function (target)
        target:data_set("key", "value")
    end)

target("bar")
    on_load(function (target)
        import("core.project.project")
        local foo = project.targets()["foo"]
        local value = foo:data("key")
    end)

use single script file

target("foo")
    on_load(function (target)
          import("load_module").load_foo(target)
    

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@davidchisnall
Comment options

@davidchisnall
Comment options

Answer selected by davidchisnall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants