I fixed my caching problem but I do have a question about the Hit_add after alter proc but that is more of a sql question however if someone could help me or if this does have to do with sharepoint I would like to know what the updated syntax for it is.
create table ActiveUsers (
UserID varchar(50) not null,
LastHit datetime not null,
LastUrl varchar(256) not null,
constraint PK_ActiveSessions primary key clustered
(
UserID
)
)
go
alter proc Hit_Add
(
@Url varchar(256),
@UserID varchar(50)
)
as
-- this needs to be changed to the userID
-- that your site runs as
if (@UserID = 'DOMAIN\PROCESSID') return
insert into Hits values
(@Url, @UserID, getdate())
delete ActiveUsers
where UserID = @UserID
or datediff(mi, LastHit, getdate()) > 30 -- minutes
insert into ActiveUsers values
(@UserID, getdate(), @Url)
go
create proc ActiveUsers_Get
as
select UserID, LastHit, LastUrl, datediff(mi, LastHit, getdate()) Age
from ActiveUsers
go