Archive

Archive for May, 2009

Crunchy Granola Snack – Tip/Recipe

May 21st, 2009

I’ve recently discovered the snackibility (probably not a word…) of granola. It’s a great food to munch on instead of super sweet candies or chocolate. Experimenting, I came up with the following healthy, and easy, treat.

  • 1/2 cup of granola
  • 1/2 cup of Rice Krispie cereal
  • cinnamon to taste
  1. Combine all ingredients in a sandwich bag and shake.

As I said, it’s a pretty simple recipe.  This is a great mid-afternoon snack, especially for kids in school.  I often make 2-3 cups and use it over multiple days.  It is also good with milk.

Has anyone tried this or a similar recipe?  What other things can you add to this to make it healthier or more interesting?  Share it in the comments!

Health, Home, Quick and Useful Tips For Various Things, Recipes

Live Blog of “WordPress Caching” by Brandon Savage

May 16th, 2009

From WordCamp Mid-Atlantic 2009 #wordcampmidatl

(slides per @brandonsavage)

  • What is caching?
  • Why we need caching?
  • Improving your code’s performance
  • Improving the content’s performance
  • Building your own caching plugin

Things that you cache…

  • code (HTML, sidebar)
  • login status (sessions, username)
  • content (MySQL queries)

Things you don’t want to cache…

  • dynamic content
  • user permissions
  • passwords
  • security settings

Why is caching important?

  • Caching improves the speed of the page load.
  • Caching reduces server load.
  • 9,829 function calls to load WordPress!

WordPress by itself is extremely inefficient!

WordPress Performance Benchmarks:

  • Wordpress by itself (with plugins):  almost 6 seconds
  • APC enabled (without WP-Cache):  about 2 seconds

Caching the code

  • Opcode cache
  1. PHP is not a complied language; code is compiled and executed at run time.
  2. Compiling code takes extra time, extra CPU, and extra resources.
  • Benefits of Opcode Cache
  • Drawback of Opcode Cache
  1. Still must invoke PHP (which requires resources)
  2. Executes “expensive” stat() calls.
  3. Doesn’t play nice with some WordPress caching systems (e.g. WP-Cache)

Bottom Line:  You’re crazy if you don’t have an Opcode cache!

Caching the content

Why cache content?

  • Most blogs don’t have content changes that often.
  • Cached content reduces server load and increases delivery.
  • When high traffic shows up, you’ll be ready.

Typical WordPress process

  • WordPress loads the plugins, then the theme, then the content and returns the page to the user.

With WP-Cache

  • Checks for a cached file.
  • If found, it serves the cached file and terminates Wordpress.
  • If not, it continues on with typical process and caches.

WP-Cache is a file-based cache.

File based caches:

  • Write directly to the disk, and read directly from the disk.
  • This can be slow, as a disk read is required.
  • This can be more reliable, as the files persist after Apache or MySQL start.

Drawbacks of WP-Cache

  • File based cache (slower)
  • Might have thousands of files
  • WP-Cache still required the PHP parser
  • WP-Cache evaluated the file before it serves it

Preparing for the Digg Effect

  • WP-Super-Cache
  1. Uses same code as WP-Cache
  2. Replaces dynamic page hyperlinks with static HTML page hyperlinks
  3. Removes the need for PHP parser

The rule of web servers: Static always beats dynamic.

Warning! If you used WP-Cache, it created a symlink for advanced-cache.php.

Words of caution…

  • WordPress has not initialized a databse connection or the WordPress framework at the cache execution time.

Home

WordCamp/Blogging again…

May 12th, 2009

I’m attnding WordCamp MidAtlantic this Saturday.  It should be a great experiance.  WordCamp is a blogging conference for individuals who have chosen to use WordPress as their blogging engine.  I hope to learn a lot, make some new connections, and prove you with plenty of information.  Also, after this Thursday, I am officially finished with school for the semester which means that I will have plenty of time to blog.  I’ll try to update at least once a day.  Let me know if you have any ideas for articles that you want to see.

Home

Simple Lime Chicken Marinade – Tips/Recipes

May 1st, 2009

Trying to find a new way to eat your chicken?  Try out this quick and easy marinade.  I put this together on a whim but it turned out pretty well.

  • 1 lime juiced
  • 2 teaspoons of Extra Virgin Olive Oil (EVOO)
  • 1 tablespoon of Mrs. Dash or other sodium-free spice
  1. Combine all ingredients in a small bowl and stir thoroughly until all ingredients are equally blended.
  2. If using with frozen chicken:  Apply marinade generously after turning chicken in the oven.
    If using with thawed chicken:  Put marinade in a Ziploc bag and let chicken soak for 6-8 hours.  Cook as desired.

Unlike most marinade, this recipe is low in sodium and is about as healthy as you’re going to get.  It adds a lot of great flavor, especially when the chicken has soaked for 8 hours.

Has anyone tried this marinade or a similar kind?  What are your thoughts?  Share with everyone via the comments.

Health, Home, Quick and Useful Tips For Various Things, Recipes