Commit 2274ed85 authored by Marco Villegas's avatar Marco Villegas
Browse files

Disable controller's cache during parsing.

parent 4ca8bea6
Loading
Loading
Loading
Loading
+9 −0
Changes for includes/VersioncontrolRepository.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -193,6 +193,8 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface
    $ret = drupal_write_record('versioncontrol_sync_log', $log);
    $sync_options = $this->getSynchronizerOptions();

    // Disable object cache on parsing.
    $this->getBackend()->disableControllerCaching();
    try {
      $sync = $this->getSynchronizer();
      if (TRUE == $this->init) {
@@ -229,6 +231,8 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface
      $log->message = "Unexpected exception of type '" . get_class($e) . "' with message: " . $e->getMessage() . PHP_EOL;
    }

    // Re-enable object cache after parsing.
    $this->getBackend()->restoreControllerCachingDefaults();
    drupal_write_record('versioncontrol_sync_log', $log, 'slid');

    return (bool) $log->successful;
@@ -255,6 +259,9 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface
    $ret = drupal_write_record('versioncontrol_sync_log', $log);
    $sync_options = $this->getSynchronizerOptions();

    // Disable object cache on parsing.
    $this->getBackend()->disableControllerCaching();

    // Try to sync the event.
    try {
      $sync = $this->getSynchronizer();
@@ -349,6 +356,8 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface

    $this->finalizeEvent($event);

    // Re-enable object cache after parsing.
    $this->getBackend()->restoreControllerCachingDefaults();
    drupal_write_record('versioncontrol_sync_log', $log, 'slid');

    return (bool) $log->successful;