LAMP How To – Open Source At Work

Only Passion Matters

Entries Tagged ‘wordpress’

using set_transient in wordpress

set_transient is an excellent caching mechanism in wordpress. However one thing to note is that it depends on the caching plugin that is installed. So for example, if the plugin caching mechanism is memcache, the cache will be stored in memcache instead of in the db. Hence clearing the memcache from the plugin will clear [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz

Preventing css or javascript caching

making css or javascript unique is important to bypass any caching mechanism, ie good for checking updates in production environment.
Some good technique involves appending a version number or timestamp after the filename. In wordpress, it is really easy
<link rel=”stylesheet” href=”<?php bloginfo(’stylesheet_url’); ?>?<?php echo filemtime(TEMPLATEPATH.’/style.css’); ?>” type=”text/css” />

Share and Enjoy:

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz

Command Line Blogging – Wordpress

I am using command line most of the time because of the nature of my work. Normally, when I discovered new techniques to do things, solved a problem or had a cool idea, I would write them down on my exercise book. It soon became clear that I needed something more concrete as copying lines [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz