regrettably Dawid is not right in this case.
You should use CurrentPageInfo instead of CurrentDocument, since you're accessing information that is available from CMS_Document table, and values from this table are accessible through PageInfo. PageInfo is cached, and already available because Kentico URL Rewriting engine retrieved it at the beginning when getting base info about requested page. Unlike PageInfo, CurrentDocument will execute extra SQL query to get pretty much same data (+ coupled table data of course).
I would recommend you to watch also this great video recorded by Miro Remias - our Sr.Solution Architect:
you can also download the PowerPoint presentation when exactly this is explained on the slide no. 8.
Best regards, Martin