Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just set up a Perforce proxy server for work. I'm noticing the cache directory is filling up very quickly -- with files I know I will never need. For example, there is a 'sandbox' directory in the depot where users keep personal branches and other work; a p4 sync is causing the p4 proxy cache to grab these user's sandboxes when I'll never need them. I would create a symbolic link for the sandbox directory to /dev/null but then I wouldn't be caching my sandbox, which I am interested in.

Is there any way to tell the perforce proxy something to the effect of "if I haven't had to sync it, please don't cache it?"

share|improve this question

migrated from Nov 30 '09 at 17:57

This question came from our site for computer enthusiasts and power users.

up vote 5 down vote accepted

I think there may be some misunderstanding of how Perforce RCS as well as the proxy works. I assume yyou are looking at the proxy cache on disk and seeing files from a portion of the depot or server that you don't expect to see? If so, check some of these files and I guarantee you'll find out that they were the source of an integration to the depot you are trying to sync. Unless you use the p4 snap command to undo all the lazy copies created during an integration this is 'by design.'

share|improve this answer
Yes! That's it exactly- thanks! – fbrereto Dec 1 '09 at 20:15

You can't tell the proxy not to cache files.

Here are some options:

  • Modify your client view to not include the directories that you don't want, then they'll never sync and wind up in cache. Everyone who uses your proxy will need to do the same thing to prevent the unwanted files from appearing in the cache.

  • Write a cron job that deletes the unwanted folders from the cache directory, and have it run hourly (or even more often if you desire). It's safe to delete files from p4p's cache while it's running.

  • Delete old files from the cache to keep it from growing without bound. There are scripts out there that can do this.

  • Add more disk space so that you don't have to worry about it :)

share|improve this answer

The proxy only caches what you request from the server, so if you "haven't had to sync it", it won't be cached. If you don't want the entire sandbox directory cached, don't sync the entire sandbox directory. Only sync what you need. It sounds like your doing this:

p4 sync //depot/sandbox/...

instead of this (let's say your sandbox directory is named fbrereto):

p4 sync //depot/sandbox/fbrereto/...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.