# APC caching - preloading files

- Thread: https://externals.io/message/51282
- Original archive: https://news-web.php.net/php.internals/51282
- Started by Bharat Nagwani on 2011-01-15T03:38:40+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #51282 — Bharat Nagwani — 2011-01-15T03:38:40+00:00

URL: https://externals.io/message/51282#51282

Hello Experts,

Sorry for posting this in this list but I am not finding any documentation on this APC php.ini setting
apc.preload_path

I have tried the following but it doesn't seem to work

apc.preload_path = "+/core/*"

apc.preload_path = "/core/*"

What I am looking for is files in certain directories (single or multiple paths are even better) to be precached when the PHP
module is first loaded so the first hit is not a miss.
Can this be achieved via APC?

I am using php 4.4.2 on BSD.

Thanks

---

## #51283 — Tjerk Meesters — 2011-01-15T04:10:25+00:00

URL: https://externals.io/message/51282#51283 · In reply to: #51282

I generally find it more reliable to use iptables to stop incoming requests
while priming the cache using a small script.

> Hello Experts,
>
> Sorry for posting this in this list but I am not finding any documentation
on this APC php.ini setting
> apc.preload_path
>
> I have tried the following but it doesn't seem to work
>
> apc.preload_path = "+/core/*"
>
> apc.preload_path = "/core/*"
>
> What I am looking for is files in certain directories (single or multiple
paths are even better) to be precached when the PHP
> module is first loaded so the first hit is not a miss.
> Can this be achieved via APC?
>
> I am using php 4.4.2 on BSD.
>
> Thanks

---

## #51286 — Rasmus Lerdorf — 2011-01-15T09:52:11+00:00

URL: https://externals.io/message/51282#51286 · In reply to: #51282

> Hello Experts,
> 
> Sorry for posting this in this list but I am not finding any documentation on this APC php.ini setting
> apc.preload_path
> 
> I have tried the following but it doesn't seem to work
> 
> apc.preload_path = "+/core/*"
> 
> apc.preload_path = "/core/*"

There is no glob support on the preload path.  It is just a straight prefix.

-Rasmus
