diff --git a/page_theme.module b/page_theme.module
index b0a3a0a..6dd651e 100644
--- a/page_theme.module
+++ b/page_theme.module
@@ -168,27 +168,39 @@ function page_theme_get_theme_options() {
 
 function page_theme_get_themes($theme = NULL) {
 
-  static $themes = array();
+  $themes = &drupal_static(__FUNCTION__);
 
-  if (!$themes) {
-
-    foreach (system_rebuild_theme_data() as $theme_data) {
+  if (!isset($themes)) {
+    if ($cache = cache_get('page_theme:themes', 'cache')) {
+      $themes = $cache->data;
+    }
+    else {
+      foreach (system_rebuild_theme_data() as $theme_data) {
 
-      $visibility = empty($theme_data->info['hidden']);
-      $compatible_core = isset($theme_data->info['core']) && $theme_data->info['core'] == DRUPAL_CORE_COMPATIBILITY && isset($theme_data->info['regions']['content']);
-      $compatible_php = version_compare(phpversion(), $theme_data->info['php'], '>=');
+        $visibility = empty($theme_data->info['hidden']);
+        $compatible_core = isset($theme_data->info['core']) && $theme_data->info['core'] == DRUPAL_CORE_COMPATIBILITY && isset($theme_data->info['regions']['content']);
+        $compatible_php = version_compare(phpversion(), $theme_data->info['php'], '>=');
 
-      if ($visibility && $compatible_core && $compatible_php) {
-        $themes[$theme_data->name] = $theme_data->info['name'];
+        if ($visibility && $compatible_core && $compatible_php) {
+          $themes[$theme_data->name] = $theme_data->info['name'];
+        }
       }
+      asort($themes);
     }
 
-    asort($themes);
+    cache_set('page_theme:themes', $themes, 'cache');
   }
 
   return !is_null($theme) ? (isset($themes[$theme]) ? $themes[$theme] : $theme) : $themes;
 }
 
+/**
+ * Implements hook_flush_caches().
+ */
+function page_theme_flush_caches() {
+  cache_clear_all('page_theme:themes', 'cache');
+}
+
 function page_theme_get_theme_name($theme) {
 
   $themes = page_theme_get_themes();
