Jump to content


Which p4 commands trigger cache update on P4P(Proxy)?

Administration Proxy

  • Please log in to reply
5 replies to this topic

#1 Ludovick

Ludovick

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 27 November 2015 - 07:34 PM

Hi,

I would like to know if they are any other commands than 'p4 sync' that can trigger a Perforce Proxy cache update. Commands such 'p4 print' for instance where some pipelines processes may use it to stream files content to something else than the usual file system.

Having this kind of command supported by proxy could be very nice, in fact maybe it is already... I just didn't find any formal documentation from Perforce that state it clearly. I can only assume that any commands relative to files fetching trigger a cache update (which is expected for such solution) but I fear to be wrong as only 'p4 sync' look to be supported'.

Thanks

#2 Domenic

Domenic

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 30 November 2015 - 10:25 PM

Is the goal to get the proxy cache updated with the latest files but not actually sync a client? If so, check out https://www.perforce...e.preload_cache - specifically the -Zproxyload option for 'sync'. Or is there a reason you'd like to avoid syncs all together?

#3 Ludovick

Ludovick

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 01 December 2015 - 03:51 PM

No, I understand how to preload a proxy but thanks you for your interest in that matter.

I would like to know if other Perforce commands relative to files content such 'p4 print' are hitting the proxy because otherwise we assume they are hitting the main server.

For instance, imagine you are using 'p4 print' to write depot files to standard output in your applications. See 'p4 help print' for more details.
It's nice to know if a Perforce proxy will support this process or not. Especially when the files size and the distance between locations are huge.

This is an example but my question here is to know, in general, the commands supported by a Perforce Proxy that will hit (and update) the proxy cache, not the ones that will be redirected to the main server.

Now some might say, why not using a Replica or Edge? I answer that these require a lot more maintenance than a simple Perforce proxy.

If there are no other commands than 'p4 sync' to be supported by Perforce proxy, I don't see any reasons to not extend this support to other commands as long as they are about files content.

I hope that was more clear.

Thanks

#4 Domenic

Domenic

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 01 December 2015 - 11:55 PM

I don't know if such a list already exists but it seems like it would be pretty easy to create given the info at https://www.perforce...istration.files. Basically, adding '-Zproxyverbose' for each command you're interested in and looking for "delivered from proxy server".

Just make sure the file is already cached so that the initial command doesn't trigger the cache :)

FWIW, when I ran 'p4 -Zproxyverbose print //depot/some/file.txt' it did indeed say it was delivered from the proxy..

#5 Ludovick

Ludovick

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 December 2015 - 07:45 PM

True, seems a correct approach:

F:\>p4 -Zproxyverbose print -o F:\Test.txt //eval/fb3f311d8.f
//eval/fb3f311d8.f#1 - add change 32702 (ubinary)

F:\>p4 -Zproxyverbose print -o F:\Test.txt //eval/fb3f311d8.f
//eval/fb3f311d8.f#1 - add change 32702 (ubinary)
File F:\Test.txt delivered from proxy server

However Perforce could officialize this information somewhere in the P4Proxy documentation.

Thanks you.

#6 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 03 December 2015 - 08:50 PM

Hello,

The '-Zproxyverbose' flag is mentioned in our Knowledge Base such as here:

  Determining If A File Is Sent From The Proxy Or The Server
    http://answers.perfo...ticles/KB/2834/

Installing a Proxy Server
    http://answers.perfo...rticles/KB/1258





Also tagged with one or more of these keywords: Administration, Proxy

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users