.\" Man page generated from reStructuredText. . .TH "TSCACHEWRITE" "3ts" "January 24, 2017" "7.0" "Apache Traffic Server" .SH NAME TSCacheWrite \- . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B TSAction TSCacheWrite(TSCont\fI\ contp\fP, TSCacheKey\fI\ key\fP) .UNINDENT .SH DESCRIPTION .sp Asks the Traffic Server cache if \fIcontp\fP can start writing the object corresponding to \fIkey\fP to the cache. .sp If the object can be written, the cache calls \fIcontp\fP back with the event \fBTS_EVENT_CACHE_OPEN_WRITE\fP\&. In this case, the cache also passes \fIcontp\fP a cache vconnection and \fIcontp\fP can then initiate a write operation on that vconnection using \fBTSVConnWrite\fP\&. The object is not committed to the cache until the vconnection is closed. When all data has been transferred, the user (\fIcontp\fP) must do an \fBTSVConnClose\fP\&. In case of any errors, the user must do an \fBTSVConnAbort(contp, 0)\fP\&. .sp If the object cannot be written, the cache calls \fIcontp\fP back with the event \fBTS_EVENT_CACHE_OPEN_WRITE_FAILED\fP\&. This can happen, for example, if there is another object with the same \fIkey\fP being written to the cache. The user (\fIcontp\fP) has the option to cancel the action returned by \fI\%TSCacheWrite\fP\&. .sp Note that reentrant calls are possible, i.e. the cache can call back the user (\fIcontp\fP) in the same call. .SH COPYRIGHT 2015, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .