Skip to content

Commit

Permalink
Merge pull request #22 from karlomikus/develop
Browse files Browse the repository at this point in the history
Cache features
  • Loading branch information
karlomikus committed Nov 22, 2022
2 parents d8c23bf + 38be67f commit 078c2ca
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=redis
SESSION_LIFETIME=120
RESPONSE_CACHE_ENABLED=false

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: kmikus12/bar-assistant-server:latest, kmikus12/bar-assistant-server:${{github.ref_name}}
cache-from: type=gha
cache-to: type=gha,mode=max
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v0.5.2
- Add response caching, disabled by default
- Cache docker image steps in GH actions

# v0.5.1
- Add cascading deletes for some foreign keys

# v0.5.0
- Use redis for session and cache
- Automatically select some ingredients when running the application for the first time
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Kernel extends HttpKernel
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
'throttle:api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Spatie\ResponseCache\Middlewares\CacheResponse::class,
],
];

Expand All @@ -65,5 +66,6 @@ class Kernel extends HttpKernel
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'cacheResponse' => \Spatie\ResponseCache\Middlewares\CacheResponse::class,
'doNotCacheResponse' => \Spatie\ResponseCache\Middlewares\DoNotCacheResponse::class,
];
}
2 changes: 1 addition & 1 deletion config/bar-assistant.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
|
*/

'version' => 'v0.5.1',
'version' => 'v0.5.2',

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/responsecache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* Determine if the response cache middleware should be enabled.
*/
'enabled' => env('RESPONSE_CACHE_ENABLED', true),
'enabled' => env('RESPONSE_CACHE_ENABLED', false),

/*
* The given class will determinate if a request should be cached. The
Expand Down

0 comments on commit 078c2ca

Please sign in to comment.