Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8372525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:27:14+00:00 2026-06-09T14:27:14+00:00

I just added clojure.core.cache 0.6.1 to my project, did a lein deps, followed the

  • 0

I just added clojure.core.cache 0.6.1 to my project, did a lein deps, followed the very short and clear example here: https://github.com/clojure/core.cache and it just flat out does not work.

Example:

$lein repl
REPL started; server listening on localhost port 20513
user=> (require '[clojure.core.cache :as cache])
nil
user=> (def fifoc (cache/fifo-cache-factory {}))
#'user/fifoc
user=> (cache/has? fifoc :foo)
false
user=> (cache/miss fifoc :foo "bar")
{:foo "bar"}
user=> (cache/has? fifoc :foo)
false

What is going wrong here? Am I completely missing the point? I’ve tried it with the other cache backends all with the same result. Tried it with different keys, different values, different namespace, different alias – nada. Running the tests gives me this:

$ lein test clojure.core.cache.tests

Testing clojure.core.cache.tests

Ran 13 tests containing 273 assertions.
0 failures, 0 errors.

Which makes this all the more mysterious. I looked at the tests, and while they :import the cache backends and instantiate them the java way (miss (BasicCache. {}) …), which I also tried, that too fails for me in exactly the same way.

Any help before I just implement one that works?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:27:15+00:00Added an answer on June 9, 2026 at 2:27 pm

    cache/miss returns a new cache object that you need to use for further operations.

    Ex:

    user=> (cache/has? (cache/miss fifoc :foo "bar") :foo)
    true
    

    Your example becomes:

    user=> (def fifoc (atom (cache/fifo-cache-factory {})))
    #'user/fifoc
    user=> (swap! fifoc  #(cache/miss % :foo "bar"))
    {:foo "bar"}
    user=> (cache/has? @fifoc :foo)
    true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just added a new Word AddIn project to my blank solution and just
I just added PrimeFaces 3.0 to a JSF project: <repository> <id>prime-repo</id> <name>PrimeFaces Maven Repository</name>
I just added the latest Facebook SDK code from Github to my project. Because
I just added a newly created SP to my project which unfortunately required a
I just added TouchXML to my project and it's telling me that: warning: Obstructing:
I just added a new view controller to my project and now when I
I just added xUnit to our test project (for the Asserts, we're still using
I just added a new MFC class in a VS2008 project and it isn't
Just added the T4MVC templates to my project, built and then tried to use
I just added a Silverlight Unit Test Application (project) to my Solution to test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.