Skip to content

Commit 8c630e4

Browse files
committed
update to use latest memof; alpha release
1 parent f4bbe80 commit 8c630e4

File tree

5 files changed

+34
-40
lines changed

5 files changed

+34
-40
lines changed

calcit.cirru

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,9 +2416,9 @@
24162416
|v $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593251136801)
24172417
:data $ {}
24182418
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593251137708) (:text |[]) (:id |aBidit7fOnleaf)
2419-
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593251140779) (:text |caches.core) (:id |PoQCmGLIBh)
2419+
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531306617) (:text |memof.core) (:id |PoQCmGLIBh)
24202420
|r $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593251141298) (:text |:as) (:id |j6uWj8O5kY)
2421-
|v $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593251142111) (:text |caches) (:id |rzyIGBToIB)
2421+
|v $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531308972) (:text |memof) (:id |rzyIGBToIB)
24222422
:id |aBidit7fOn
24232423
|v $ {} (:type :expr) (:by |root) (:at 1542475452932) (:id |1Ewu-xKE7G)
24242424
:data $ {}
@@ -2442,28 +2442,15 @@
24422442
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250841175) (:text |let) (:id |NE78T8svtleaf)
24432443
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250841566)
24442444
:data $ {}
2445-
|T $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250844094)
2446-
:data $ {}
2447-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250843257) (:text |xs) (:id |zLusppqOyd)
2448-
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250845750)
2449-
:data $ {}
2450-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250847398) (:text |concat) (:id |tItyQQ4Izz)
2451-
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250848664)
2452-
:data $ {}
2453-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250847777) (:text |f) (:id |bqLmjD46dQ)
2454-
|D $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250849342) (:text |[]) (:id |TDkq1DBcd)
2455-
:id |1pn0Tcc8K
2456-
|r $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250850702) (:text |params) (:id |Xu-04F7e0G)
2457-
:id |OkBxY48x7
2458-
:id |9L5tFHjSX
24592445
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250851701)
24602446
:data $ {}
24612447
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250852645) (:text |v) (:id |09S46kWPwrleaf)
24622448
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250853126)
24632449
:data $ {}
2464-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250857230) (:text |caches/access-cache) (:id |9oGd_yDq4F)
2465-
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250857755) (:text |xs) (:id |8uvRH3yYtM)
2450+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531350318) (:text |memof/access-record) (:id |9oGd_yDq4F)
2451+
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531387206) (:text |params) (:id |8uvRH3yYtM)
24662452
|b $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965810507) (:text |*twig-caches) (:id |3LNkATBtSN)
2453+
|f $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531322537) (:text |f) (:id |hw0bEMYgQ-)
24672454
:id |CHpD4Wcj_
24682455
:id |09S46kWPwr
24692456
:id |SAuh0X1H1N
@@ -2494,10 +2481,11 @@
24942481
:id |lbbjBGwcDh
24952482
|r $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593250875704)
24962483
:data $ {}
2497-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250882922) (:text |caches/write-cache!) (:id |x_vNRTD5Uleaf)
2498-
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250885255) (:text |xs) (:id |bfJMkNvD6)
2484+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531347623) (:text |memof/write-record!) (:id |x_vNRTD5Uleaf)
2485+
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531332657) (:text |params) (:id |bfJMkNvD6)
24992486
|r $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250888637) (:text |result) (:id |ceoNcmbXW)
25002487
|b $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965824796) (:text |*twig-caches) (:id |gF6czmUmrs)
2488+
|f $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531331144) (:text |f) (:id |sBZDCjJliv)
25012489
:id |x_vNRTD5U
25022490
|v $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593250890538) (:text |result) (:id |b8qy4k2-As)
25032491
:id |Ef1TVvhEtp
@@ -2511,7 +2499,7 @@
25112499
|r $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593252594077) (:data $ {}) (:id |uVQgK6SXFj)
25122500
|v $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593252596729)
25132501
:data $ {}
2514-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593252605045) (:text |caches/reset-caches!) (:id |WY3twp8pUZleaf)
2502+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531345206) (:text |memof/reset-entries!) (:id |WY3twp8pUZleaf)
25152503
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965832515) (:text |*twig-caches) (:id |-Rcqg5usQ)
25162504
:id |WY3twp8pUZ
25172505
:id |16IoXLAo1o
@@ -2522,31 +2510,35 @@
25222510
|r $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593253142551) (:data $ {}) (:id |-BwZbUEhVb)
25232511
|v $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593253153364)
25242512
:data $ {}
2525-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593253157174) (:text |caches/new-loop!) (:id |p7Vepox3I9)
2513+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531355385) (:text |memof/new-loop!) (:id |p7Vepox3I9)
25262514
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965835858) (:text |*twig-caches) (:id |YEeYVsaH3u)
25272515
:id |_7at-XTN_
25282516
:id |WWrUKPPmr6
25292517
|*twig-caches $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965811733)
25302518
:data $ {}
25312519
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965814009) (:text |defonce) (:id |G_tWv07Xdd)
25322520
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965811733) (:text |*twig-caches) (:id |n0zcWyTivY)
2533-
|r $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965811733)
2521+
|r $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1594531314694)
25342522
:data $ {}
2535-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965820605) (:text |caches/new-caches) (:id |e-BzPJANb6)
2536-
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965845075)
2523+
|T $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965811733)
25372524
:data $ {}
2538-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965845458) (:text |{}) (:id |wUQmS4EsIP)
2539-
:id |R9rANgcgU
2540-
:id |ZHh8teaNtO
2525+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531313711) (:text |memof/new-states) (:id |e-BzPJANb6)
2526+
|j $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965845075)
2527+
:data $ {}
2528+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965845458) (:text |{}) (:id |wUQmS4EsIP)
2529+
:id |R9rANgcgU
2530+
:id |ZHh8teaNtO
2531+
|D $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531315831) (:text |atom) (:id |kOV2H_6nKa)
2532+
:id |heCxE3w6X3
25412533
:id |ilkArrO1YA
25422534
|show-tag-summay $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965917428)
25432535
:data $ {}
25442536
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965917428) (:text |defn) (:id |gCEHRo5wA4)
25452537
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965990334) (:text |show-twig-summay) (:id |kLSZ8gCLGT)
25462538
|r $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965917428)
25472539
:data $ {}
2548-
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965926982) (:text |caches/show-summary!) (:id |lBgFvdHRix)
2549-
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1593965930458) (:text |*twig-caches) (:id |0iVMhqCwxS)
2540+
|T $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531367490) (:text |memof/show-summary) (:id |lBgFvdHRix)
2541+
|j $ {} (:type :leaf) (:by |SygU7c6BlG) (:at 1594531363951) (:text |@*twig-caches) (:id |0iVMhqCwxS)
25502542
:id |7g4r7jdLK6
25512543
|n $ {} (:type :expr) (:by |SygU7c6BlG) (:at 1593965936237) (:data $ {}) (:id |Jz5qvG454)
25522544
:id |KuPJrf06Mf

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
:paths ["src" "polyfill"]
33
:deps {
4-
cumulo/caches {:mvn/version "0.0.1"}
4+
cumulo/memof {:mvn/version "0.2.0-a3"}
55
}
66
:aliases {
77
:release {

release.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{:version "0.6.1-a2"
1+
{:version "0.6.1-a3"
22
:group-id "cumulo"
33
:artifact-id "recollect"
44
:skip-tag true

shadow-cljs.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[respo "0.12.3"]
88
[respo/ui "0.3.15"]
99
[cumulo/util "0.1.12"]
10-
[cumulo/caches "0.1.0-a1"]
10+
[cumulo/memof "0.2.0-a3"]
1111
[respo/value "0.3.0"]
1212
[org.clojure/core.incubator "0.1.4"]
1313
]

src/recollect/twig.cljs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11

2-
(ns recollect.twig (:require [caches.core :as caches]) (:require-macros [recollect.twig]))
2+
(ns recollect.twig (:require [memof.core :as memof]) (:require-macros [recollect.twig]))
33

4-
(defonce *twig-caches (caches/new-caches {}))
4+
(defonce *twig-caches (atom (memof/new-states {})))
55

66
(defn call-twig-func [f params]
7-
(let [xs (concat [f] params), v (caches/access-cache *twig-caches xs)]
7+
(let [v (memof/access-record *twig-caches f params)]
88
(if (some? v)
99
v
10-
(let [result (apply f params)] (caches/write-cache! *twig-caches xs result) result))))
10+
(let [result (apply f params)]
11+
(memof/write-record! *twig-caches f params result)
12+
result))))
1113

12-
(defn clear-twig-caches! [] (caches/reset-caches! *twig-caches))
14+
(defn clear-twig-caches! [] (memof/reset-entries! *twig-caches))
1315

14-
(defn new-twig-loop! [] (caches/new-loop! *twig-caches))
16+
(defn new-twig-loop! [] (memof/new-loop! *twig-caches))
1517

16-
(defn show-twig-summay [] (caches/show-summary! *twig-caches))
18+
(defn show-twig-summay [] (memof/show-summary @*twig-caches))

0 commit comments

Comments
 (0)