Check offer "active" field, if it was changed, then clear cache
510837
protected function checkActiveField()
    {
        //check offer "active" field
        if ($this->obElement->getOriginal('active') == $this->obElement->active) {
            return;
        }

        $this->clearProductActiveList();
        OfferListStore::instance()->active->clear();

        $this->clearProductSortingByPrice();

        $obProduct = $this->obElement->product;
        if (empty($obProduct)) {
            return;
        }

        $this->clearProductItemCache($this->obElement->product_id);

        $obCategoryItem = CategoryItem::make($obProduct->category_id);
        if ($obCategoryItem->isEmpty()) {
            return;
        }

        $obCategoryItem->clearProductCount();
    }
631220
function(evnt) {
			if (evnt && evnt.type === 'Changed' && Array.isArray(evnt.modified)) {
				evnt.modified.forEach(function(file) {
					if (typeof file === 'string') {
						cache.remove(getKey(file));
						jsoncache.remove(getKey(file));
						escache.remove(getKey(file));
					}
				});
			}
		}
710987
public void refreshCachedValues() {
        if (noteColumn) {
            note = getHistoryReference().hasNote();
        }
        if (tagsColumn) {
            tags = listToCsv(getHistoryReference().getTags());
        }
        if (highestAlertColumn) {
            alertRiskCellItem = AlertRiskTableCellItem.getItemForRisk(getHistoryReference().getHighestAlert());
        }
    }
675547
def post_field_cache(self, field_cache):
        """"""
        index_pattern = self.field_cache_to_index_pattern(field_cache)
        # self.pr_dbg("request/post: %s" % index_pattern)
        resp = requests.post(self.post_url, data=index_pattern).text
        # resp = {"_index":".kibana","_type":"index-pattern","_id":"aaa*","_version":1,"created":true}  # noqa
        resp = json.loads(resp)
        return 0
17479
def clear_cache(self):
        """"""
        self.raw_packet_cache = None
        for _, fval in six.iteritems(self.fields):
            if isinstance(fval, Packet):
                fval.clear_cache()
        self.payload.clear_cache()
955198
def change_and_save(self, update_only_changed_fields=False, **changed_fields):
        
        bulk_change_and_save(self, update_only_changed_fields=update_only_changed_fields, **changed_fields)
        return self.filter()
1098815
def _mark_updated(self):
        """"""
        timestamp = datetime.datetime.utcnow().isoformat()
        DB.set_hash_value(self.key, 'updated', timestamp)
829422
def _check_if_all_updated(self):
        """"""
        for g in self.toc.toc:
            if g not in self.values:
                return False
            for n in self.toc.toc[g]:
                if n not in self.values[g]:
                    return False

        return True
586461
function onActivate(event) {
  // Delete old caches to save space.
  const dropOldCaches = async () => {
    const cacheNames = await caches.keys();

    // Return true on all the caches we want to clean up.
    // Note that caches are shared across the origin, so only remove
    // caches we are sure we created.
    const cleanTheseUp = cacheNames.filter((cacheName) =>
        cacheName.startsWith(CACHE_NAME_PREFIX) && cacheName != CACHE_NAME);

    const cleanUpPromises =
        cleanTheseUp.map((cacheName) => caches.delete(cacheName));

    await Promise.all(cleanUpPromises);
  };

  event.waitUntil(dropOldCaches());
}
784005
def reload(options = nil)
      options = (options || {}).merge(no_obfuscated_id: true)

      clear_aggregation_cache
      clear_association_cache

      fresh_object =
        if options && options[:lock]
          self.class.unscoped { self.class.lock(options[:lock]).find(id, options) }
        else
          self.class.unscoped { self.class.find(id, options) }
        end

      @attributes = fresh_object.instance_variable_get('@attributes')
      @new_record = false
      self
    end
390841
def is_modified(self):
        
        if len(self.__modified_data__) or len(self.__deleted_fields__):
            return True

        for value in self.__original_data__.values():
            try:
                if value.is_modified():
                    return True
            except AttributeError:
                pass

        return False
851612
public function detectChanges()
    {
        clearstatcache(true, $this->path);

        if (! $this->exists && $this->files->exists($this->path)) {
            $this->lastModified = $this->files->lastModified($this->path);
            $this->exists = true;

            return [new Event($this, Event::RESOURCE_CREATED)];
        } elseif ($this->exists && ! $this->files->exists($this->path)) {
            $this->exists = false;

            return [new Event($this, Event::RESOURCE_DELETED)];
        } elseif ($this->exists && $this->isModified()) {
            $this->lastModified = $this->files->lastModified($this->path);

            return [new Event($this, Event::RESOURCE_MODIFIED)];
        }

        return [];
    }
791799
def fixed(self):
        
        decision = False
        for record in self.history:
            # Completely ignore older changes
            if record["when"] < self.options.since.date:
                continue
            # Look for status change to MODIFIED (unless already found)
            if not decision and record["when"] < self.options.until.date:
                for change in record["changes"]:
                    if (change["field_name"] == "status"
                            and change["added"] == "MODIFIED"
                            and change["removed"] != "CLOSED"):
                        decision = True
            # Make sure that the bug has not been later moved to ASSIGNED.
            # (This would mean the issue has not been fixed properly.)
            else:
                for change in record["changes"]:
                    if (change["field_name"] == "status"
                            and change["added"] == "ASSIGNED"):
                        decision = False
        return decision
910546
def clean_value(self):
        '''
        
        '''
        # XXX cached_property is used only for set initial state
        #     this property should be set every time field data
        #     has been changed, for instance, in accept method
        python_data = self.parent.python_data
        if self.name in python_data:
            return python_data[self.name]
        return self.get_initial()
290189
def clean_cache(self, request):
        
        treenav.delete_cache()
        self.message_user(request, _('Cache menuitem cache cleaned successfully.'))
        info = self.model._meta.app_label, self.model._meta.model_name
        changelist_url = reverse('admin:%s_%s_changelist' % info, current_app=self.admin_site.name)
        return redirect(changelist_url)
543207
def changed(self):
        """"""
        return dict(
            (field, self.previous(field))
            for field in self.fields
            if self.has_changed(field)
        )
731263
public function resetActive()
    {
        $obUserStorage = $this->getUserStorage();
        $obUserStorage->clear(self::FIELD_NAME);

        $this->obActiveCurrency = $this->obDefaultCurrency;
    }