rinvex / laravel-repositories

⚠️ [ABANDONED] Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain.
https://rinvex.com
MIT License
666 stars 115 forks source link

Is it possible to disable cache temporarily? #108

Closed ahmadazimi closed 8 years ago

ahmadazimi commented 8 years ago

Hi there,

Is there any way to disable cache temporarily for a specific query?

for example:

$role = $this->repo->disableCache()->findAll();
Omranic commented 8 years ago

Hi @ahmadazimi Yup, you can do so as follows:

// Disable cache for this individual query
$repository->setCacheLifetime(0);

Feel free to comment or re-open this issue if you need any further assistance 😉