I am using laravel pennant for feature flags, essentially only for reading if the features are enabled or not. Is there a way for pennant to not use the DB and store data in Features table? I want the feature flags to be computed on every request.
I am using laravel pennant for feature flags, essentially only for reading if the features are enabled or not. Is there a way for pennant to not use the DB and store data in Features table? I want the feature flags to be computed on every request.
2
Answers
If you want to disable caching for Laravel Eloquent queries, you can do so by turning off query caching using the disableQueryLog method. Here’s how you can use it:
Here it’s example:
By calling DB::connection()->disableQueryLog(), you ensure that query caching is disabled for the specific block of code where you need it. This allows you to run queries without caching within that context.
You can set
PENNANT_STORE
in your .env file toarray
to use in-memory storage.You may need to run
php artisan optimize
for the change to take effect.