Cache Configuration

Uploaded on

Learn how to configure the default values in PVCache class of ProdigyView.

Learn how to configure the default values in PVCache class of ProdigyView.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Cache Configuration
  • 2. OverviewObjectiveLearn how configure and initialize PVCache inProdigyView..Requirements Basic Understanding of Cache and Memcache in ProdigyViewEstimated Time5 Minutes
  • 3. Follow Along With Code Example1. Download a copy of the example code at Install the system in an environment you feel comfortable testing in.3. Proceed to examples/system/Cache_Configuration.php
  • 4. Disable BootstrapThe first thing we need to do is disable initialization of thecache on the bootstrap.
  • 5. Set Up the OptionNext step is to set up the default options. Every time youexecute a PVCache::writeCache(),PVCache::readCache() or the other methods inPVCache , these options act the default value.
  • 6. Cache LocationCache location is the default location on the server wherethe cache will be saved if you use the file cache.
  • 7. Cache FormatOur cache format is a date and time format set in thecache. The default format is:The dates are generated with PHP date() function, whichmean you can change it to any value that is accepted intothat function.
  • 8. Cache Format SearchThe format search is a regular expression that will look forthe date/time format with the cache named appended toit.This mean that if you change the cache_format, you alsohave to change the format search to regular expressionthat matches your new date/time format.
  • 9. Enclosing Tags The enclosing tags are the tags to surround the cache name and the cache date.Applying the closing tags above with return the cache toresemble a format similar to this. Cache Name Date/Time Format Enclosing Tags
  • 10. Cache NameThe cache name is the name associated with formatteddate in the cache.Modifying the name with PVCache::writeCache() willallow you to have multiple caches in one file.
  • 11. Cache ExpireThe cache expire, is the expiration in seconds of when thecache will expire from the time that is it set.You want to find a value that is optimal to your server setupand the type of content you are delivering.
  • 12. Memcache ServersMemcache cache option is the server(s) that are usedwhen using memcache on your site.As many servers as you want can be added in an arrayformat, but not every server needs to connect. Theconnection works just like regular memcache. See the apifor the values that can be passed when adding a server.
  • 13. Final StepThe final step is passing the array of configured optionsinto the init function and you are done. You havesuccessfully configured the default values for the entirePVCache class.
  • 14. API ReferenceFor a better understanding of cache in ProdigyView, visitthe api by clicking on the link below.PVCache More TutorialsFor more tutorials, please visit: