laracasts / matryoshka

Russian Doll Caching in Laravel
https://laracasts.com/series/russian-doll-caching-in-laravel
MIT License
238 stars 38 forks source link

Support for 5.5? #12

Open darielopper opened 7 years ago

darielopper commented 7 years ago

I'm using 5.5 version, I read the installation steps and still something gone wrong. This is the message: Parse error: syntax error, unexpected ''my-cache-key'' (T_CONSTANT_ENCAPSED_STRING)

And this is the code, just the same provided by you in documentation. @cache('my-cache-key')

Hello World

 @endcache

I'm using redis as cache driver and It's set in .env file.

erashdan commented 5 years ago

+1

wtoalabi commented 5 years ago

If you are still interested, I have answer for you.

What I did was to first create my own Service Provider. Here: https://gist.github.com/wtoalabi/50ff0cb790a6d23b45bac493a181ebc7

Then I made a POPO that uses and replicates everything Matryoshka was trying to do. Here: https://gist.github.com/wtoalabi/b4432eb4d5d3e83aa2f74648b39deeff

For some reason, I dont know why this package does not work anymore...I spent a full day trying to make it work until I decided to make a custom one for my project.

It helps that I watched the video so I sort of knew Jeff's state of mind when the package was being created.

So, yeah...until its fixed officially, I hope my examples help you.

NB: Dont know what/how enough to submit a PR.