• No results found

Bubble Full Page Cache for Magento

N/A
N/A
Protected

Academic year: 2021

Share "Bubble Full Page Cache for Magento"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

Bubble  Full  Page  Cache  for  Magento  

–  

User  Guide  

Author:     Johann  Reinke   Version:   2.2  

Website:   https://www.bubbleshop.net  

Support:   [email protected]  

(2)

Table  of  Contents  

1

 

Introducing  Bubble  Full  Page  Cache  ...  3

 

1.1

 

Features  ...  3

 

1.2

 

Compatibility  ...  3

 

2

 

Installation  ...  3

 

2.1

 

Instructions  ...  3

 

2.2

 

Multiple  hosts  ...  4

 

2.3

 

APC  ...  4

 

3

 

Customization  (for  developers)  ...  5

 

3.1

 

Accessing  the  configuration  in  Magento  admin  panel  ...  5

 

3.2

 

Cacheable  Actions  ...  5

 

3.3

 

Dynamic  Blocks  ...  6

 

4

 

Cache  generation  methods  ...  7

 

4.1

 

From  Magento  admin  (recommended)  ...  7

 

4.2

 

wget  command  ...  8

 

4.3

 

PHP  script  ...  8

 

 

(3)

  3  

1

Introducing  Bubble  Full  Page  Cache  

1.1

Features  

The  module  Full  Page  Cache  boosts  your  Magento  store  drastically  by  adding  a  low  level  caching  system  that  bypass  the   all  Magento  stack  on  each  request.  Here  are  the  main  features:  

• 90%  faster  than  default  Magento  caches   • Drastically  decreases  pages  load  time  

• Caches  by  default  all  categories,  products,  catalog  search,  sitemaps  and  CMS  pages   • Increases  SEO  rating  

• Fully  compatible  with  multi  domains,  multi  stores,  multi  currencies,  multi  languages,  multi  customer  groups   • No  Varnish  or  any  reverse  proxy  needed  

• Cache  management  in  Magento  admin  panel   • Cache  lifetime  

• Easy  installation  in  5  minutes   • Works  out  of  the  box  

• Fully  compatible  with  default  Magento  caches,  Magento  compilation,  APC   • Pre-­‐warm  cache  from  Magento  admin  or  PHP  script  (can  be  added  as  cron)   • 100%  open  source,  no  PHP  encoder  used  

1.2

 Compatibility  

Bubble  Full  Page  Cache  has  been  tested  successfully  on  the  following  Magento  versions:  

• Magento  Community  Edition  1.7.x,  1.8.x,  1.9.x.   • Magento  Enterprise  1.12.x,  1.13.x,  1.14.x.  

2

Installation  

2.1

Instructions  

• Backup  your  existing  database  

• Download  and  unzip  extension  in  your  Magento  root  folder  

• Clear  cache  via  “System  >  Cache  Management  >  Flush  Magento  Cache”   • Enable  Full  Page  Caching  in  “System  >  Cache  Management”  

• Finally,  modify  your  index.php  file  located  in  Magento  root  folder  so  it  looks  like  this:  

   

Important:  if  you  have  defined  a  default  store  view  with  a  code  different  than  “default”,  you  have  to  add  another  line   that  defines  the  default  store  view  like  below:  

(4)

 

2.2

Multiple  hosts  

If  you  have  defined  several  hosts  on  a  same  Magento  installation,  you  have  to  configure  what  is  the  default  store  for   each  host  in  top  of  file  index.php.  Here  is  an  example  for  a  french  store  view  with  a  specific  host:  

 

 

2.3

APC  

If  you  are  using  APC  as  an  opcode  cache,  you  have  to  be  aware  of  the  configuration.  Check  if  the  directive  apc.stat  is  set   to  Off  (or  zero).  If  it  is,  you  have  to  define  the  full  page  cache  directory  as  excluded  by  adding  the  directive:  

(5)

  5  

3

Customization  (for  developers)  

3.1

Accessing  the  configuration  in  Magento  admin  panel  

 

3.2

Cacheable  Actions  

   

The  default  cached  pages  should  be  enough  for  improving  performances  of  your  Magento  store.  But  you  can  add  your   own  pages  easily.  You  just  have  to  follow  the  syntax  <module>/<controller>/<action>.  Here  is  an  example:  

(6)

 

   

If  you  don’t  want  an  existing  page  to  be  cached,  you  can  disable  it  by  clicking  the  Edit  link,  see  result  below:    

 

3.3

Dynamic  Blocks  

Default    Magento  dynamic  blocks  are  already  handled  by  FPC  extension  such  as  welcome  message,  flash  messages,   polls,  cart  items,  etc.  

However,  sometimes  you’ll  have  to  add  your  custom  logic  because  you  have  a  dynamic  block  to  show  in  your  product   page  for  example.  This  can  be  achieved  easily  with  FPC  thanks  to  an  event  that  is  dispatched  when  a  page  cache  is   generated.  

 

Example  of  a  custom  dynamic  block  

 

1.  Listen  to  the  dispatched  event  

 

<!-- app/code/local/Your/Module/etc/config.xml --> <?xml version="1.0" encoding="UTF-8"?>

<config> <modules> <Your_Module> <version>1.0.0</version> </Your_Module> </modules> <global> <events> <bubble_fpc_layout_params>

(7)

  7   <observers> <your_module> <class>your_module/observer</class> <method>onFullPageCacheGeneration</method> </your_module> </observers> </bubble_fpc_layout_params> </events> </global> </config>  

2.  Add  your  criteria  in  observer  method    

<?php

// app/code/local/Your/Module/Model/Observer.php class Your_Module_Model_Observer

{

public function onFullPageCacheGeneration(Varien_Event_Observer $observer) {

$layout = $observer->getEvent()->getLayout(); if ($layout) {

// Example of a country parameter added to all pages $layout->setCustomerCountry('France');

} } }

4

Cache  generation  methods  

4.1

From  Magento  admin  (recommended)  

Go  to  “System  >  Configuration  >  Full  Page  Cache”  and  you  will  see  the  Store  View  tab  by  default:    

   

 

Then,  generate  cache  for  a  specific  store  view:    

(8)

   

 

All  URLs  of  the  store  will  be  called  and  the  cache  will  be  generated:    

 

4.2

wget  command  

Generate  cache  via  wget  command  is  the  most  powerful  method  but  it  is  also  the  longest  because  it  generates  the  cache   for  all  the  pages.  Here  is  an  example  of  how  to  generate  cache  for  all  the  pages  of  the  default  store  view:  

wget http://www.mystore.com -r --delete-after -nd -R png,jpeg,jpg,gif,zip,txt,pdf -X

"/customer,/checkout,/catalog,/wishlist,/tag,/sales" --cookies=off --header "Cookie: store=default" You  are  free  to  customize  this  command,  for  example  by  accepting  only  .html  files:  

wget http://www.mystore.com -r --delete-after -nd –A html --cookies=off --header "Cookie: store=default"

4.3

PHP  script  

The  module  comes  with  a  PHP  script  that  allows  you  to  call  all  the  URLs  of  a  specific  store.    

(9)

  9  

php shell/fpc.php --generate --store default

Another  example  for  french  store  view:  

php shell/fpc.php --generate --store french

References

Related documents

A recent randomised controlled trial (RCT) has shown that among nulliparous women aged 35 years, elective induction of labour at 39 weeks of gestation had no significant effect on

[r]

only, at either of the planning offices detailed below and check the application to ensure it meets the local and national validation requirements subject to the validation

Three bacteria, IC-59, IC-76A and IC-2002, isolated from the nodules of chickpea, were characterized for no- dulation, nitrogen fixation, plant growth-promoting (PGP) and yield traits

The coefficient of friction (the ratio between the force required to move an object and its weight) is a measure of the slip resistance of a surface for a certain object. Friction

Full Page Cache allows merchants to shorten Magento website loading time by caching product, catalog, and CMS pages.. Use Magento Full

● Must solve a puzzle on the cache page to get the coordinates ● All clues needed to solve the puzzle must be on the cache page ● All the information to solve the puzzle must

The aim of this thesis is to perform an analysis of Signal recognition and Background rejection in order to outline a framework for data analysis based on Artificial Neural