get_settings() static public method

some settings can be expensive to compute - let's cache them
static public get_settings ( )
 function test_can_write_settings()
 {
     $settings = Jetpack_Sync_Settings::get_settings();
     foreach (array('dequeue_max_bytes', 'sync_wait_time', 'upload_max_bytes', 'upload_max_rows', 'max_queue_size', 'max_queue_lag', 'disable', 'render_filtered_content') as $key) {
         $this->assertTrue(isset($settings[$key]));
     }
     $settings['dequeue_max_bytes'] = 50;
     Jetpack_Sync_Settings::update_settings($settings);
     $updated_settings = Jetpack_Sync_Settings::get_settings();
     $this->assertSame(50, $updated_settings['dequeue_max_bytes']);
 }
 function set_defaults()
 {
     $this->sync_queue = new Jetpack_Sync_Queue('sync');
     $this->full_sync_queue = new Jetpack_Sync_Queue('full_sync');
     $this->codec = new Jetpack_Sync_JSON_Deflate_Array_Codec();
     // saved settings
     Jetpack_Sync_Settings::set_importing(null);
     $settings = Jetpack_Sync_Settings::get_settings();
     $this->set_dequeue_max_bytes($settings['dequeue_max_bytes']);
     $this->set_upload_max_bytes($settings['upload_max_bytes']);
     $this->set_upload_max_rows($settings['upload_max_rows']);
     $this->set_sync_wait_time($settings['sync_wait_time']);
     $this->set_sync_wait_time($settings['enqueue_wait_time']);
     $this->set_sync_wait_threshold($settings['sync_wait_threshold']);
     $this->set_max_dequeue_time(Jetpack_Sync_Defaults::get_max_sync_execution_time());
 }
 protected function result()
 {
     require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-settings.php';
     return Jetpack_Sync_Settings::get_settings();
 }