Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Inject the Cache Service in Symfony 3

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:08
    Phew! OK, dependency Injection, check.
  • 0:12
    Registering new services, check.
  • 0:14
    Delicious snack, check.
  • 0:17
    Well, I hope you just had a delicious snack.
  • 0:20
    This tutorial is the start to our victory lap.
  • 0:24
    We need to add caching to MarkdownTransformer, and it should be pretty easy.
  • 0:29
    Copy part of the old caching code and paste it into the parse() function.
  • 0:37
    Remove the else part of the if,
  • 0:41
    and just return $cache->fetch().
  • 0:45
    Below, assign the method to the $str variable,

Inject the Cache Service in Symfony 3


In this lesson you'll inject cache service, applying what we've already learned about dependency injection and type-hinting as we refactor the code in our evolving app.

Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.