if I use in a Master Page
File.ReadAllText
to load some text from a Text file ,as string in a Literal.
When I will load the Content Page depending on my Master Page the code will open and read the Text file all the times (for every content page request) OR the Text File will be CACHED in the Master Page only once?
Thanks for your time
It will not be cached. Master pages even compiled don't execute the code you've written in them at compilation time.
For example the following thing:
<div><%= File.ReadAllText( someFile ) %></div>
will be compiled to something essentially the same as the following:
builder.Append("<div>").Append( File.ReadAllText( someFile ) ).Append( "</div>" )
which will be executed each time this master page is loaded.