Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103487 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30082 invoked from network); 23 Nov 2018 20:00:32 -0000 Received: from unknown (HELO mail-qt1-f182.google.com) (209.85.160.182) by pb1.pair.com with SMTP; 23 Nov 2018 20:00:32 -0000 Received: by mail-qt1-f182.google.com with SMTP id v11so10995940qtc.2 for ; Fri, 23 Nov 2018 08:23:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1qON5Y1oMh1EhcHRElkcCzx7QsIXGUXvzf8HCgPZxOM=; b=VvKe/jm/GtjD+QyVryvSJbBGAbj/VMhCU60WjSUqOFMAjdol1E2Rqo6FVsgdYSCYHV R+3KZJP3UvM7BahDVqX5+tBRRD+fPVFtDLjdvThHE1HG4TqXMMk1/jFsu0UhUGWHXf/q 5YaQvi2KLF5aC1C/BsBFkrb7pC1VZTaVBmO7N5FLcw30drKglU0T9OsjvAuXT/YB+Q92 kLrBZa0PzQ+W+94I+NHbxdbgJi/KYGuUKsrJNatVy9rwtKbh2CeH/IQuSLzV13Spg+5m 3qyi33XemX2KMPhnJryW/rBROfh0ZoS02PtND7CnZ3JdTlGKrGAXqBMZxH4XLU/btZtR jRhg== X-Gm-Message-State: AA+aEWY5pAZEMebwDaynGTN/OxXWZJtdWibyysfnWvVYCJVvrp7XoBBz 1BHbYRKKtzYYwdGNGJY5PSitSn/Ur4xv4sNMZ2vHUQ== X-Google-Smtp-Source: AJdET5dAJWOmKd8inRcq4ftndmtwcuyqrZW1VkItcYIbsjokWDvYVlKHNBTxQscE3xALStRYsAaPjSbZsoVc7O8/58o= X-Received: by 2002:aed:29c7:: with SMTP id o65mr15170161qtd.353.1542990192214; Fri, 23 Nov 2018 08:23:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 23 Nov 2018 10:23:01 -0600 Message-ID: To: Pierre Joye Cc: Dmitry Stogov , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="0000000000004c9a79057b57665c" Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)" From: pollita@php.net (Sara Golemon) --0000000000004c9a79057b57665c Content-Type: text/plain; charset="UTF-8" On Fri, Nov 23, 2018 at 8:36 AM Pierre Joye wrote: > > Especially, the main preload.php, usually should be marked, to disable > its > > caching. > > > > should this specific case not be done automatically then? > > I'm with Pierre on this. During the preload phase, we should probably have implicit caching disabled and only cache things brought in via opcache_compile_file(). Outside of the preload pragma, I'd worry that this declare would be mistakenly overused in most cases. Question though... who wins if a file is explicitly loaded with opcache_compile_file *and* it has the "don't cache me, bro" pragma? I'd expect the file wouldn't be cached in that case. That said, I'm of the "here's your gun, try not to shoot yourself" school on most things, and I see no harm in this when used judiciously, so no objections from me. -Sara --0000000000004c9a79057b57665c--