User cache problem
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- Wall0fDeath
- Posts: 28
- Joined: 30 Aug 2022, 13:56
User cache problem
Php : 8.2
Os: Debian GNU/Linux 11 (Bullseye)
Aimeos 22.10.12
Laravel 9.37.0
Hi! )
I have a task, to make a review with more functions. ( send email after some hours, upload images, give order reviews not just product etc... )
I've managed to do most parts, but I had to make a page, where they can return by a link in a sent out email and where they can give the reviews.
It should be available to logged in users, and logged out users.
My problem is this:
When I'm logged in and try any link from the email, it always brings good data, what it should.
When I'm logged out, it somehow caches the last logged in user's template data, and it shows that data on any link. What datas I give from my queries to the view are all good at the end. But it shows the cached template.
After a "php artisan aimeos:clear" it will generate the template again, than i get good data, for that link.
common/cache/force is commented out in shop.php.
ACPu is off in shop.php.
I have 2 questions:
Is there any way to tell the system to generate this template again without cache?
Is there any way to delete this user cache after pressing logout, to prevent possible security problems?
Thanks in advance!
Os: Debian GNU/Linux 11 (Bullseye)
Aimeos 22.10.12
Laravel 9.37.0
Hi! )
I have a task, to make a review with more functions. ( send email after some hours, upload images, give order reviews not just product etc... )
I've managed to do most parts, but I had to make a page, where they can return by a link in a sent out email and where they can give the reviews.
It should be available to logged in users, and logged out users.
My problem is this:
When I'm logged in and try any link from the email, it always brings good data, what it should.
When I'm logged out, it somehow caches the last logged in user's template data, and it shows that data on any link. What datas I give from my queries to the view are all good at the end. But it shows the cached template.
After a "php artisan aimeos:clear" it will generate the template again, than i get good data, for that link.
common/cache/force is commented out in shop.php.
ACPu is off in shop.php.
I have 2 questions:
Is there any way to tell the system to generate this template again without cache?
Is there any way to delete this user cache after pressing logout, to prevent possible security problems?
Thanks in advance!
Re: User cache problem
Hello,
I think you need to look here:
https://aimeos.org/docs/2022.x/frontend ... ents/#body
If your component implements caching in the body(), I think you just need to make it so it returns the $html
Remove this:
In the end return the $html
I think you need to look here:
https://aimeos.org/docs/2022.x/frontend ... ents/#body
If your component implements caching in the body(), I think you just need to make it so it returns the $html
Remove this:
Code: Select all
if( $html = $this->cached( 'body', $uid, $params, $confkey ) ) {
return $this->modify( $html, $uid );
}
- Wall0fDeath
- Posts: 28
- Joined: 30 Aug 2022, 13:56
Re: User cache problem
Thank you! It saved my day! ^^