If you are hosting the jquery and yui files locally you can set expiration on them using IIS. If you are using the google cdn to serve the files (this is done by default) then you have no control over it but they do get cached.
It is not something I can build into the static files, it can only be managed by the web server.
If you use Firebug plugin you can watch the network requests and you will see that it does not retrieve the jquery or yui files over and over even though page speed plugin or YSlow plugin may notice that they do not have expiry set on them, browsers still do cache them.
Best,
Joe