{"action":"created","issue":{"url":"https://api.github.com/repos/GordonLesti/Lesti_Fpc/issues/112","labels_url":"https://api.github.com/repos/GordonLesti/Lesti_Fpc/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/GordonLesti/Lesti_Fpc/issues/112/comments","events_url":"https://api.github.com/repos/GordonLesti/Lesti_Fpc/issues/112/events","html_url":"https://github.com/GordonLesti/Lesti_Fpc/issues/112","id":68456496,"number":112,"title":"getStockStatusChangedAuto() vs getStockStatusChangedAutomatically()","user":{"login":"peterjaap","id":431360,"avatar_url":"https://avatars.githubusercontent.com/u/431360?v=3","gravatar_id":"","url":"https://api.github.com/users/peterjaap","html_url":"https://github.com/peterjaap","followers_url":"https://api.github.com/users/peterjaap/followers","following_url":"https://api.github.com/users/peterjaap/following{/other_user}","gists_url":"https://api.github.com/users/peterjaap/gists{/gist_id}","starred_url":"https://api.github.com/users/peterjaap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterjaap/subscriptions","organizations_url":"https://api.github.com/users/peterjaap/orgs","repos_url":"https://api.github.com/users/peterjaap/repos","events_url":"https://api.github.com/users/peterjaap/events{/privacy}","received_events_url":"https://api.github.com/users/peterjaap/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-14T18:02:14Z","updated_at":"2015-11-11T11:01:34Z","closed_at":"2015-04-15T07:03:57Z","body":"In Lesti_Fpc_Model_Observer_Save, there is this piece of code;\r\n\r\n    public function cataloginventoryStockItemSaveAfter($observer)\r\n    {\r\n        $item = $observer->getEvent()->getItem();\r\n        if ($item->getStockStatusChangedAuto()) {\r\n            $this->_getFpc()->clean(sha1('product_' . $item->getProductId()));\r\n        }\r\n    }\r\n\r\nThe function getStockStatusChangedAuto() should have an equivalent setStockStatusChangedAuto() function. But when I look through the Magento core, I get this;\r\n\r\n```\r\n➜  ~/magento git:(master) ✗ ack setStockStatusChangedAuto app/code/core\r\napp/code/core/Mage/ImportExport/Model/Import/Entity/Product.php\r\n1876:                    $stockItem->setStockStatusChangedAutomatically((int) !$stockItem->verifyStock());\r\n\r\napp/code/core/Mage/CatalogInventory/Model/Stock.php\r\n208:                    ->setStockStatusChangedAutomaticallyFlag(true);\r\n\r\napp/code/core/Mage/CatalogInventory/Model/Stock/Item.php\r\n61: * @method Mage_CatalogInventory_Model_Stock_Item setStockStatusChangedAutomatically(int $value)\r\n727:                    ->setStockStatusChangedAutomaticallyFlag(true);\r\n738:            $this->setStockStatusChangedAutomatically(0);\r\n740:                $this->setStockStatusChangedAutomatically((int)$this->getStockStatusChangedAutomaticallyFlag());\r\n➜  ~/magento git:(master) ✗\r\n```\r\n\r\nWhich leads me to believe that getStockStatusChangedAuto() should actually be getStockStatusChangedAutomatically(). I've looked at the magic setters and getters to make sure there is no max length on the magic functions, but it seems there isn't ([reference](https://github.com/OpenMage/magento-mirror/blob/magento-1.9/lib/Varien/Object.php#L623)), leading me to assume that this flag is never set, thereby the product will not be invalidated by this trigger."},"comment":{"url":"https://api.github.com/repos/GordonLesti/Lesti_Fpc/issues/comments/155736699","html_url":"https://github.com/GordonLesti/Lesti_Fpc/issues/112#issuecomment-155736699","issue_url":"https://api.github.com/repos/GordonLesti/Lesti_Fpc/issues/112","id":155736699,"user":{"login":"phrench","id":5553586,"avatar_url":"https://avatars.githubusercontent.com/u/5553586?v=3","gravatar_id":"","url":"https://api.github.com/users/phrench","html_url":"https://github.com/phrench","followers_url":"https://api.github.com/users/phrench/followers","following_url":"https://api.github.com/users/phrench/following{/other_user}","gists_url":"https://api.github.com/users/phrench/gists{/gist_id}","starred_url":"https://api.github.com/users/phrench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phrench/subscriptions","organizations_url":"https://api.github.com/users/phrench/orgs","repos_url":"https://api.github.com/users/phrench/repos","events_url":"https://api.github.com/users/phrench/events{/privacy}","received_events_url":"https://api.github.com/users/phrench/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T11:01:34Z","updated_at":"2015-11-11T11:01:34Z","body":"Is this the only way to automatically flush/clear the product page cache of a product that has been ordered?"}}