Skip to content

Commit 1b2ad2b

Browse files
brimonkcgsdev0
authored andcommitted
caching is only enabled when $DEV is set to false
1 parent 5933b0c commit 1b2ad2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,7 @@ writeHttpResponse() {
485485
}
486486

487487
findRoutes() {
488-
local SIZE
489-
SIZE=$(stat -c "%s" $ROUTES_CACHE)
490-
if [[ $SIZE -eq 0 ]]; then
488+
if [[ -z $ROUTES_CACHE ]] || [[ $(stat -c "%s" $ROUTES_CACHE) -eq 0 ]]; then
491489
cd pages
492490
find . -type f,l -iname '*.sh' | sed 's@^\./@@' | tee $ROUTES_CACHE
493491
else

start.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ if [[ "${DEV:-true}" == "true" ]] && [[ ! -z "$TAILWIND" ]]; then
1010
PID=$!
1111
fi
1212

13-
export ROUTES_CACHE=$(mktemp)
13+
if [[ "${DEV:-true}" != "true" ]]; then
14+
export ROUTES_CACHE=$(mktemp)
15+
fi
1416

1517
# remove any old subscriptions; they are no longer valid
1618
rm -rf pubsub

0 commit comments

Comments
 (0)