diff --git a/lib/db/caches.php b/lib/db/caches.php
index 6c3ebe0..a1de75e 100644
--- a/lib/db/caches.php
+++ b/lib/db/caches.php
@@ -75,4 +75,12 @@ $definitions = array(
         'datasource' => 'question_finder',
         'datasourcefile' => 'question/engine/bank.php',
     ),
+
+    'plugintypes' => array(
+        'mode' => cache_store::MODE_APPLICATION,
+        'persistent' => true,
+        'persistentmaxsize' => 5,
+        'simpledata' => true,
+        'simplekeys' => true
+    )
 );
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index 9a8ddf1..a6abe9b 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -8010,6 +8010,9 @@ function get_plugin_types($fullpaths=true) {
     static $info     = null;
     static $fullinfo = null;
 
+    $cache = cache::make('core', 'plugintypes');
+    $info = $cache->get($fullpaths ? 'true' : 'false');
+
     if (!$info) {
         $info = array('qtype'         => 'question/type',
                       'mod'           => 'mod',
@@ -8059,9 +8062,16 @@ function get_plugin_types($fullpaths=true) {
         foreach ($info as $type => $dir) {
             $fullinfo[$type] = $CFG->dirroot.'/'.$dir;
         }
+
+        $cache->set('true', $fullinfo);
+        $cache->set('false', $info);
+
+        if ($fullpaths) {
+            $info = $fullinfo;
+        }
     }
 
-    return ($fullpaths ? $fullinfo : $info);
+    return $info;
 }
 
 /**
