clojureringliberator

functions being run and cached during compile time


I'm currently working on a project that uses ring and liberator to serve from a database. For some reason, the compiler seems to be calling one of my functions and caching the result, causing the values outputted to http to never change until a server restart. here is a gist with my code: https://gist.github.com/sakekasi/9337146 . any ideas as to what could cause something like this?


Solution

  • Make sure that the values for the resource definitions are functions. From the stacktrace with the exception you can conclude that the function get-latest-link is run on compile/eval time.