{"id":59,"date":"2025-02-25T16:13:31","date_gmt":"2025-02-25T12:43:31","guid":{"rendered":"https:\/\/techport.ir\/?p=59"},"modified":"2025-02-25T16:20:06","modified_gmt":"2025-02-25T12:50:06","slug":"op-cache-%d8%af%d8%b1-php-%d9%88-laravel","status":"publish","type":"post","link":"https:\/\/techport.ir\/?p=59","title":{"rendered":"op cache \u062f\u0631 php \u0648 laravel"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u0645\u0646\u0628\u0639: chatgpt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>OPcache<\/strong> \u062f\u0631 PHP \u06cc\u06a9 \u0627\u06a9\u0633\u062a\u0646\u0634\u0646 \u0627\u0633\u062a \u06a9\u0647 \u06a9\u062f \u0628\u0627\u06cc\u062a\u200c\u06a9\u062f\u0647\u0627\u06cc PHP \u0631\u0627 \u06a9\u0634 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u0628\u0647 \u062c\u0627\u06cc \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f\u0647\u0627\u06cc PHP \u062f\u0631 \u0647\u0631 \u0628\u0627\u0631 \u0627\u062c\u0631\u0627\u060c \u0627\u0632 \u0627\u06cc\u0646 \u0628\u0627\u06cc\u062a\u200c\u06a9\u062f\u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644\u200c\u0634\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0641\u0631\u0622\u06cc\u0646\u062f \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0647\u0627 \u0631\u0627 \u06a9\u0627\u0647\u0634 \u062f\u0627\u062f\u0647 \u0648 \u0628\u0627\u0639\u062b \u0628\u0647\u0628\u0648\u062f \u0639\u0645\u0644\u06a9\u0631\u062f \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 <strong>\u0644\u0627\u0631\u0627\u0648\u0644<\/strong>\u060c OPcache \u0628\u0647 \u0635\u0648\u0631\u062a \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u062a\u0648\u0633\u0637 \u0633\u0631\u0648\u0631\u0647\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f\u06cc (production) \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u062a\u0627 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u200c\u0647\u0627 \u0631\u0627 \u06a9\u0627\u0647\u0634 \u062f\u0647\u062f. \u0644\u0627\u0631\u0627\u0648\u0644 \u0627\u0632 OPcache \u0628\u0631\u0627\u06cc \u0628\u0647\u06cc\u0646\u0647\u200c\u0633\u0627\u0632\u06cc \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0647\u0627\u06cc PHP \u0628\u0647\u0631\u0647 \u0645\u06cc\u200c\u0628\u0631\u062f \u0648 \u0627\u062c\u0631\u0627\u06cc \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc \u0648\u0628 \u0631\u0627 \u0633\u0631\u06cc\u0639\u200c\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 OPcache \u0628\u0631\u0627\u06cc \u067e\u0631\u0648\u0698\u0647\u200c\u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u0644\u0627\u0631\u0627\u0648\u0644\u06cc \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u062a\u0627 \u0633\u0631\u0639\u062a \u0648 \u0639\u0645\u0644\u06a9\u0631\u062f \u0628\u0647\u062a\u0631\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u0686\u062c\u0648\u0631\u06cc opcache \u0631\u0627 \u062f\u0631 php \u0648 \u0644\u0627\u0631\u0627\u0648\u0644 \u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u0645. \u0622\u06cc\u0627 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0645\u0627\u0698\u0648\u0644 \u062f\u0627\u0631\u062f\u061f<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">\u0628\u0631\u0627\u06cc \u0641\u0639\u0627\u0644 \u06a9\u0631\u062f\u0646 <strong>OPcache<\/strong> \u062f\u0631 <strong>PHP<\/strong> \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062f\u0631 <strong>\u0644\u0627\u0631\u0627\u0648\u0644<\/strong>\u060c \u0628\u0627\u06cc\u062f \u0645\u0631\u0627\u062d\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0646\u06cc\u062f. \u0628\u0644\u0647\u060c OPcache \u06cc\u06a9 <strong>\u0645\u0627\u0698\u0648\u0644<\/strong> \u062f\u0627\u062e\u0644\u06cc PHP \u0627\u0633\u062a \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0641\u0639\u0627\u0644 \u0634\u0648\u062f.<\/h6>\n\n\n\n<h3 class=\"wp-block-heading\">\u06f2. <strong>\u0641\u0639\u0627\u0644 \u06a9\u0631\u062f\u0646 OPcache \u062f\u0631 PHP<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0645\u0627\u0698\u0648\u0644 OPcache \u062f\u0631 PHP \u0646\u0635\u0628 \u0648 \u0641\u0639\u0627\u0644 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0645\u0627\u0698\u0648\u0644 \u0628\u0647 \u0635\u0648\u0631\u062a \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0628\u0627 PHP \u0647\u0645\u0631\u0627\u0647 \u0627\u0633\u062a\u060c \u0627\u0645\u0627 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0641\u0639\u0627\u0644\u200c\u0633\u0627\u0632\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u0645\u0631\u0627\u062d\u0644 \u0641\u0639\u0627\u0644\u200c\u0633\u0627\u0632\u06cc OPcache:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06f1. \u0628\u0631\u0631\u0633\u06cc \u0646\u0635\u0628 \u0628\u0648\u062f\u0646 OPcache:<\/strong> \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f OPcache \u0646\u0635\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"php -m | grep opcache\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FF79C6\">-<\/span><span style=\"color: #BD93F9\">m<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FF79C6\">|<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">grep<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">opcache<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u0627\u06af\u0631 \u0686\u06cc\u0632\u06cc \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0646\u0634\u062f\u060c \u0628\u0627\u06cc\u062f OPcache \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u06f2. <strong>\u0641\u0639\u0627\u0644\u200c\u0633\u0627\u0632\u06cc OPcache \u062f\u0631 php.ini:<\/strong> \u0641\u0627\u06cc\u0644 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a PHP (<code>php.ini<\/code>) \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0641\u0639\u0627\u0644 \u06a9\u0631\u062f\u0646 OPcache \u067e\u06cc\u062f\u0627 \u06cc\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"zend_extension=opcache.so      ; \u062f\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633\nzend_extension=php_opcache.dll ; \u062f\u0631 \u0648\u06cc\u0646\u062f\u0648\u0632\n\nopcache.enable=1\nopcache.memory_consumption=128\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.revalidate_freq=2\nopcache.fast_shutdown=1\nopcache.enable_cli=1\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BD93F9\">zend_extension<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">so<\/span><span style=\"color: #F8F8F2\">      ; <\/span><span style=\"color: #BD93F9\">\u062f\u0631<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">\u0644\u06cc\u0646\u0648\u06a9\u0633<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">zend_extension<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">php_opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">dll<\/span><span style=\"color: #F8F8F2\"> ; <\/span><span style=\"color: #BD93F9\">\u062f\u0631<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">\u0648\u06cc\u0646\u062f\u0648\u0632<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">enable<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">memory_consumption<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">128<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">interned_strings_buffer<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">8<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">max_accelerated_files<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">10000<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">revalidate_freq<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">fast_shutdown<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">opcache<\/span><span style=\"color: #FF79C6\">.<\/span><span style=\"color: #BD93F9\">enable_cli<\/span><span style=\"color: #FF79C6\">=<\/span><span style=\"color: #BD93F9\">1<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u06f3. <strong>\u0631\u06cc\u200c\u0627\u0633\u062a\u0627\u0631\u062a \u06a9\u0631\u062f\u0646 \u0648\u0628 \u0633\u0631\u0648\u0631:<\/strong> \u067e\u0633 \u0627\u0632 \u0627\u0639\u0645\u0627\u0644 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062f\u0631 \u0641\u0627\u06cc\u0644 <code>php.ini<\/code>\u060c \u0648\u0628 \u0633\u0631\u0648\u0631 (\u0645\u062b\u0644 Apache \u06cc\u0627 Nginx) \u0631\u0627 \u0631\u06cc\u200c\u0627\u0633\u062a\u0627\u0631\u062a \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo service apache2 restart\n# \u06cc\u0627 \u0628\u0631\u0627\u06cc Nginx:\nsudo service nginx restart\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BD93F9\">sudo<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">service<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">apache2<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">restart<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6272A4\"># \u06cc\u0627 \u0628\u0631\u0627\u06cc Nginx:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">sudo<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">service<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">nginx<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">restart<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u06f2. <strong>\u0641\u0639\u0627\u0644\u200c\u0633\u0627\u0632\u06cc OPcache \u062f\u0631 \u0644\u0627\u0631\u0627\u0648\u0644<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 \u0644\u0627\u0631\u0627\u0648\u0644\u060c \u0634\u0645\u0627 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0646\u062c\u0627\u0645 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u062e\u0627\u0635\u06cc \u0628\u0631\u0627\u06cc OPcache \u0646\u062f\u0627\u0631\u06cc\u062f. \u0628\u0647 \u0645\u062d\u0636 \u0641\u0639\u0627\u0644 \u0634\u062f\u0646 OPcache \u062f\u0631 PHP\u060c \u0644\u0627\u0631\u0627\u0648\u0644 \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0627\u0632 \u0645\u0632\u0627\u06cc\u0627\u06cc \u0622\u0646 \u0628\u0647\u0631\u0647\u200c\u0645\u0646\u062f \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0631\u062e\u06cc \u0627\u0642\u062f\u0627\u0645\u0627\u062a \u0628\u0647\u06cc\u0646\u0647\u200c\u0633\u0627\u0632\u06cc \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f \u062a\u0627 \u06a9\u0627\u0631\u0627\u06cc\u06cc \u0644\u0627\u0631\u0627\u0648\u0644 \u0627\u0641\u0632\u0627\u06cc\u0634 \u06cc\u0627\u0628\u062f:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u0645\u0631\u0627\u062d\u0644 \u0628\u0647\u06cc\u0646\u0647\u200c\u0633\u0627\u0632\u06cc:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u06f1. <strong>\u0628\u0647\u06cc\u0646\u0647\u200c\u0633\u0627\u0632\u06cc \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0644\u0627\u0631\u0627\u0648\u0644:<\/strong> \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644 \u0648 \u06a9\u0634 \u06a9\u0631\u062f\u0646 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0648 \u0645\u0633\u06cc\u0631\u0647\u0627\u06cc \u0644\u0627\u0631\u0627\u0648\u0644 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"php artisan config:cache\nphp artisan route:cache\nphp artisan view:cache\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">artisan<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">config<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #BD93F9\">cache<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">artisan<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">route<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #BD93F9\">cache<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">artisan<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">view<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #BD93F9\">cache<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u06f2. <strong>\u067e\u0627\u06a9\u0633\u0627\u0632\u06cc \u06a9\u0634\u200c\u0647\u0627 (\u062f\u0631 \u0635\u0648\u0631\u062a \u0646\u06cc\u0627\u0632):<\/strong> \u0627\u06af\u0631 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a\u06cc \u062f\u0631 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u06cc\u0627 \u0645\u0633\u06cc\u0631\u0647\u0627 \u062f\u0627\u0634\u062a\u06cc\u062f\u060c \u0642\u0628\u0644 \u0627\u0632 \u0627\u0639\u0645\u0627\u0644 \u062f\u0648\u0628\u0627\u0631\u0647 \u06a9\u0634\u060c \u0627\u0628\u062a\u062f\u0627 \u06a9\u0634\u200c\u0647\u0627 \u0631\u0627 \u067e\u0627\u06a9 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282A36\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"php artisan config:clear\nphp artisan route:clear\nphp artisan view:clear\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dracula\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">artisan<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">config<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #BD93F9\">clear<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">artisan<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">route<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #BD93F9\">clear<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BD93F9\">php<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">artisan<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #BD93F9\">view<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #BD93F9\">clear<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u0646\u062a\u06cc\u062c\u0647:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>OPcache<\/strong> \u06cc\u06a9 \u0645\u0627\u0698\u0648\u0644 \u062f\u0627\u062e\u0644\u06cc PHP \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0628\u0647\u0628\u0648\u062f \u0639\u0645\u0644\u06a9\u0631\u062f \u0644\u0627\u0632\u0645 \u0627\u0633\u062a \u0641\u0639\u0627\u0644 \u0634\u0648\u062f. \u067e\u0633 \u0627\u0632 \u0641\u0639\u0627\u0644\u200c\u0633\u0627\u0632\u06cc \u062f\u0631 PHP\u060c \u0644\u0627\u0631\u0627\u0648\u0644 \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0627\u0632 \u0622\u0646 \u0628\u0647\u0631\u0647 \u0645\u06cc\u200c\u0628\u0631\u062f.<\/li>\n\n\n\n<li>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u06a9\u0634 \u0644\u0627\u0631\u0627\u0648\u0644\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u06a9\u0627\u0631\u0627\u06cc\u06cc \u0628\u06cc\u0634\u062a\u0631\u06cc \u0628\u0647\u0631\u0647\u200c\u0645\u0646\u062f \u0634\u0648\u06cc\u062f.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0645\u0646\u0628\u0639: chatgpt OPcache \u062f\u0631 PHP \u06cc\u06a9 \u0627\u06a9\u0633\u062a\u0646\u0634\u0646 \u0627\u0633\u062a \u06a9\u0647 \u06a9\u062f \u0628\u0627\u06cc\u062a\u200c\u06a9\u062f\u0647\u0627\u06cc PHP \u0631\u0627 \u06a9\u0634 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u0628\u0647 \u062c\u0627\u06cc \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644 \u0645\u062c\u062f\u062f \u06a9\u062f\u0647\u0627\u06cc PHP \u062f\u0631 \u0647\u0631 \u0628\u0627\u0631 \u0627\u062c\u0631\u0627\u060c \u0627\u0632 \u0627\u06cc\u0646 \u0628\u0627\u06cc\u062a\u200c\u06a9\u062f\u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644\u200c\u0634\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0641\u0631\u0622\u06cc\u0646\u062f \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0647\u0627 \u0631\u0627 \u06a9\u0627\u0647\u0634 \u062f\u0627\u062f\u0647 \u0648 \u0628\u0627\u0639\u062b \u0628\u0647\u0628\u0648\u062f \u0639\u0645\u0644\u06a9\u0631\u062f \u0645\u06cc\u200c\u0634\u0648\u062f. \u062f\u0631 \u0644\u0627\u0631\u0627\u0648\u0644\u060c OPcache \u0628\u0647 \u0635\u0648\u0631\u062a \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u062a\u0648\u0633\u0637 \u0633\u0631\u0648\u0631\u0647\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f\u06cc (production) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3],"tags":[5],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-laravel","category-php","tag-source_chatgpt"],"_links":{"self":[{"href":"https:\/\/techport.ir\/index.php?rest_route=\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techport.ir\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techport.ir\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techport.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techport.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59"}],"version-history":[{"count":3,"href":"https:\/\/techport.ir\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":62,"href":"https:\/\/techport.ir\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions\/62"}],"wp:attachment":[{"href":"https:\/\/techport.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techport.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techport.ir\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}