skip to Main Content

Laravel cache with route model binding? – SEO

I'm adding caching to my Laravel app routes. I have a function that renders a blog post on my site: public function show(Post $post) { SEO::setTitle($post->title); SEO::setDescription($post->subtitle); SEO::setCanonical('https://employbl.com/blog/' . $post->slug); SEO::opengraph()->setUrl('https://employbl.com/blog/' . $post->slug); SEO::opengraph()->addProperty('type', 'article'); SEO::opengraph()->addImage($post->featured_image); SEO::twitter()->setSite('@Employbl_Jobs'); $markdown = Markdown::parse($post->body);…

VIEW QUESTION

Use fastify-redis from controllers in node.js

How to use fastify-redis plugin from other controllers or other.js while declaring the redis connection in server.js server.js const fastify = require('fastify')({ logger: false }) const routes = require('./routes') fastify.register(require('fastify-redis'), { host: '127.0.0.1' }) routes.forEach((route, index) => { fastify.route(route) })…

VIEW QUESTION

How to enable browser cache on nginx? – Plesk

I tried to analyze web speed with PageSpeed Insights and Google told me that I need to enable cache. So I added to my .htaccess: <IfModule mod_expires.c> <FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|webp|js|css|swf|gz|json)$"> ExpiresActive On ExpiresDefault A604800 </FilesMatch> </IfModule> <IfModule mod_headers.c> <FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|webp|js|css|swf|gz|json)$"> Header…

VIEW QUESTION
Back To Top
Search