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

  • Home
  • SEARCH
  • 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 7948255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:40:21+00:00 2026-06-04T01:40:21+00:00

lein new caching I then go in and edit my project.clj file like so.

  • 0
lein new caching

I then go in and edit my project.clj file like so.

(defproject caching "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.clojure/core.cache "0.5.0"]]
  :plugins [[lein-swank "1.4.3"]])

I execute:

lein repl

dependencies are pulled, everything is fine.

I then edit core.clj with the following, inspired by the example documentation at https://github.com/clojure/core.cache/wiki/LRU

(ns caching.core
  (:require [clojure.core.cache :as cache]))

(cache/lru-cache-factory {} :limit 2)

and get back the following error when compiling core.clj . So… What am I doing wrong? Has anyone gotten this to work correctly?

Wrong number of args (3) passed to: cache$lru-cache-factory
  [Thrown class clojure.lang.ArityException]

Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0:        AFn.java:437 clojure.lang.AFn.throwArity
  1:         AFn.java:47 clojure.lang.AFn.invoke
  2:    NO_SOURCE_FILE:1 caching.core/eval2247
  3:  Compiler.java:6465 clojure.lang.Compiler.eval
  4:  Compiler.java:6431 clojure.lang.Compiler.eval
  5:       core.clj:2795 clojure.core/eval
  6:        core.clj:532 swank.core/eval782[fn]
  7:    MultiFn.java:163 clojure.lang.MultiFn.invoke
  8:        basic.clj:54 swank.commands.basic/eval-region
  9:        basic.clj:44 swank.commands.basic/eval-region
 10:        basic.clj:73 swank.commands.basic/eval968[fn]
 11:        Var.java:401 clojure.lang.Var.invoke
 12:    (Unknown Source) caching.core/eval2245
 13:  Compiler.java:6465 clojure.lang.Compiler.eval
 14:  Compiler.java:6431 clojure.lang.Compiler.eval
 15:       core.clj:2795 clojure.core/eval
 16:        core.clj:100 swank.core/eval-in-emacs-package
 17:        core.clj:256 swank.core/eval-for-emacs
 18:        Var.java:409 clojure.lang.Var.invoke
 19:        AFn.java:167 clojure.lang.AFn.applyToHelper
 20:        Var.java:518 clojure.lang.Var.applyTo
 21:        core.clj:600 clojure.core/apply
 22:        core.clj:107 swank.core/eval-from-control
 23:        core.clj:330 swank.core/spawn-worker-thread[fn]
 24:        AFn.java:159 clojure.lang.AFn.applyToHelper
 25:        AFn.java:151 clojure.lang.AFn.applyTo
 26:        core.clj:600 clojure.core/apply
 27:        core.clj:326 swank.core/spawn-worker-thread[fn]
 28:     RestFn.java:397 clojure.lang.RestFn.invoke
 29:         AFn.java:24 clojure.lang.AFn.run
 30:     Thread.java:662 java.lang.Thread.run
  • 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-04T01:40:23+00:00Added an answer on June 4, 2026 at 1:40 am

    It appears that lru-cache-factory had a different args list for version 0.5.0 of core.cache.

    Here is a copy of the diff from commit a052bb568a1ca84b73ffda0bd252f01c5fa310aa

    -  [limit base]
    +  [base & {limit :limit :or {limit 32}}]
    

    Try using 0.6.0-SNAPSHOT of core.cache in order to follow the tutorial.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my project.clj file so far: (defproject raj 0.0.1-SNAPSHOT :description FIXME: write description
For a Lein project called myproject, I've created a file core.clj in the myproject/test/
I have a project with three subprojects like so (using lein-sub ): (defproject trident
I'm using lein to manage my project, and I have a number of :dependencies
Is it possible to add new stuff to the classpath (e.g. editing project.clj and
In a new fresh leiningen project, with its core.clj containing (defn show-cmd [] (->
I am starting lein new project in clojure and want to use the goose
When I start a lein repl for a Clojure project, the namespace clojure.repl is
I have a lein project (using cascalog--but that's not particularly important). I'm trying to
if I enable eith the clojure-couchdb or swank-clojure then lein deps fails because org.apache.maven:super-pom:jar:2.0

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.