mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Prime the cache during |overload
This commit is contained in:
parent
18f349aa05
commit
85e6b70d50
@ -288,6 +288,14 @@
|
||||
::
|
||||
++ take-made ::
|
||||
|= {way/wire dep/@uvH reg/gage:ford}
|
||||
:: hack for |overload
|
||||
::
|
||||
:: We might have gotten an ignorable response back for our cache priming
|
||||
:: ford call. If it matches our magic wire, ignore it.
|
||||
::
|
||||
?: =(/prime/cache way)
|
||||
~& %cache-primed
|
||||
abet
|
||||
abet:abet:(made:(take way) dep reg)
|
||||
::
|
||||
++ take-coup-fancy ::
|
||||
@ -333,6 +341,19 @@
|
||||
|= {way/wire $~}
|
||||
?> ?=({@ $~} way)
|
||||
=+ tym=(slav %dr i.way)
|
||||
:: this builds up a ford build for the front page to prime the cache.
|
||||
=. +>.$
|
||||
=/ request-data :~
|
||||
[0 [0 8.080] 0 'localhost' ~]
|
||||
:: associate 0 as the anonymous ship, which is the ++add result.
|
||||
[[0 (scot %p (add our ^~((bex 64))))] ~ ~]
|
||||
'not-yet-implemented'
|
||||
`'en-US,en;q=0.9'
|
||||
`.127.0.0.1
|
||||
==
|
||||
=/ monies/coin [%many ~[[%blob request-data] [%$ ~.n 0]]]
|
||||
=/ request/silk:ford [%bake %urb monies [our %home [%da now]] /web]
|
||||
(emit `card`[%exec /kiln/prime/cache our `[[our %home [%da now]] request]])
|
||||
=. +>.$
|
||||
(emit %wipe /kiln/overload/[i.way] our ~)
|
||||
=. +>.$
|
||||
|
Loading…
Reference in New Issue
Block a user