Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@oVerde
Created May 9, 2019 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oVerde/5063a6707adfa02c5d6af578ae12fdd8 to your computer and use it in GitHub Desktop.
Save oVerde/5063a6707adfa02c5d6af578ae12fdd8 to your computer and use it in GitHub Desktop.
Google AppEngine Memcache Example in Clojure
(:import (com.google.appengine.api.memcache MemcacheService MemcacheServiceFactory))
(def ^MemcacheService syncCache (MemcacheServiceFactory/getMemcacheService))
(.put syncCache "listUserChannels5648348291792896" {:csid ""
:unread 7})
(log/info (.contains syncCache "key"))
(log/info (class (.get syncCache "listUserChannels5648348291792896")))
(log/info (.get syncCache "listUserChannels5648348291792896"))
@oVerde
Copy link
Author

oVerde commented May 9, 2019

Precisa rodar no emulador local:

  1. compile um uberwar com lein pedestal uberwar
  2. entre na pasta target e faça jar -vxf no arquivo
  3. suba um diretório e copie o appengine-web.xml para o target/WEB-INF/ sem as variáveis de ambiente
  4. volte para a target/ e execute /Applications/google-cloud-sdk/bin/java_dev_appserver.sh .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment